mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 00:49:07 +08:00
Merge pull request #681 from mlorb/ml_sci_1351
fix errors in repo table [SCI-1351]
This commit is contained in:
commit
aa749cfd23
2 changed files with 4 additions and 3 deletions
|
@ -670,7 +670,7 @@ function onClickSave() {
|
|||
if (input) {
|
||||
input.closest('.form-group').addClass('has-error');
|
||||
input.parent().append("<span class='help-block'>" +
|
||||
val.value[0] + '<br /></span>');
|
||||
val.data[0] + '<br /></span>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ class RepositoryRowsController < ApplicationController
|
|||
)
|
||||
unless cell_value.save
|
||||
errors[:repository_cells] << {
|
||||
"#{cell.repository_column.id}": cell_value.errors.messages
|
||||
"#{column.id}": cell_value.errors.messages
|
||||
}
|
||||
raise ActiveRecord::RecordInvalid
|
||||
end
|
||||
|
@ -106,7 +106,8 @@ class RepositoryRowsController < ApplicationController
|
|||
existing.value.data = value
|
||||
unless existing.value.save
|
||||
errors[:repository_cells] << {
|
||||
"#{cell.repository_column_id}": existing.value.errors.messages
|
||||
"#{existing.repository_column_id}":
|
||||
existing.value.errors.messages
|
||||
}
|
||||
raise ActiveRecord::RecordInvalid
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue