persists responsible name, even if the user is erased

This commit is contained in:
kikito
2016-04-11 12:21:11 +02:00
parent 5e19f33c49
commit 5fec3b9858
2 changed files with 12 additions and 4 deletions

View File

@@ -123,7 +123,7 @@ class SpendingProposal < ActiveRecord::Base
end
def set_responsible_name
self.responsible_name = author.try(:document_number)
self.responsible_name = author.try(:document_number) if author.try(:document_number).present?
end
end