Fix inventory rows without files not being saved bug

Closes SCI-2471.
This commit is contained in:
Luka Murn 2018-05-30 14:41:20 +02:00
parent 3253cac86f
commit 68f5a6bebd

View file

@ -253,8 +253,8 @@ class Asset < ApplicationRecord
report_elements.destroy_all
asset_text_datum.destroy if asset_text_datum.present?
# Nullify needed to force paperclip file deletion
self.file = nil
save
file = nil
save && reload
end
def destroy