mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 05:34:55 +08:00
Merge pull request #706 from ZmagoD/zd_SCI_1385
fixes row dupplication [fixes SCI-1385]
This commit is contained in:
commit
514c6c0d53
1 changed files with 3 additions and 0 deletions
|
@ -45,6 +45,7 @@ class RepositoryRowsController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
raise ActiveRecord::Rollback if errors[:repository_cells].any?
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -135,6 +136,7 @@ class RepositoryRowsController < ApplicationController
|
|||
}
|
||||
end
|
||||
end
|
||||
raise ActiveRecord::Rollback if errors[:repository_cells].any?
|
||||
end
|
||||
# Clean up empty cells, not present in updated record
|
||||
@record.repository_cells.each do |cell|
|
||||
|
@ -144,6 +146,7 @@ class RepositoryRowsController < ApplicationController
|
|||
else
|
||||
@record.repository_cells.each { |c| c.value.destroy }
|
||||
end
|
||||
raise ActiveRecord::Rollback if errors[:repository_cells].any?
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
|
Loading…
Add table
Reference in a new issue