[#2604] Warn that we are destroying an invalid ProcedurePresentation

This commit is contained in:
Frederic Merizen 2018-10-23 12:18:46 +02:00
parent 14fd60bee7
commit 51954a6d85

View file

@ -17,6 +17,10 @@ class AssignTo < ApplicationRecord
# a bug somewhere else that we need to fix.
errors = procedure_presentation.errors
Raven.capture_message(
"Destroying invalid ProcedurePresentation",
extra: { procedure_presentation: procedure_presentation.as_json }
)
self.procedure_presentation = nil
errors
end