Merge pull request #706 from ZmagoD/zd_SCI_1385

fixes row dupplication [fixes SCI-1385]
This commit is contained in:
Zmago Devetak 2017-06-22 17:47:00 +02:00 committed by GitHub
commit 514c6c0d53

View file

@ -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|