Merge pull request #1181 from Ducz0r/lm-sci-2471-fix

Fix inventory rows without files not being saved bug [SCI-2471]
This commit is contained in:
Luka Murn 2018-05-30 18:33:50 +02:00 committed by GitHub
commit 58e6701b0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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