Fix previous workaround for the uploaded Design
This commit is contained in:
1 parent
a571d1dcff
commit
77b8fcdd1d
3 files changed
+11
-7
No files matched your search
@@ -86,10 +86,14 @@ class Design
|
||||
|
||||
def process_object(object)
|
||||
if object.to_save
|
||||
new_object = self.send(object._type.downcase.pluralize).build
|
||||
new_object.file = object.file
|
||||
object.destroy
|
||||
new_object.save
|
||||
if object.file_filename.nil?
|
||||
new_object = self.send(object._type.downcase.pluralize).build
|
||||
new_object.file = object.file
|
||||
object.destroy
|
||||
new_object.save
|
||||
else
|
||||
object.save
|
||||
end
|
||||
end
|
||||
if object.to_destroy
|
||||
object.destroy
|
||||
|
||||
Reference in new issue
Block a user