Fix frame data records being created for non-ugoira posts.
* Prevent non-ugoira posts from getting dummy frame data records with all the columns set to null. * Make `data` and `content_type` columns NOT NULL, since they should always be present. * Remove the timestamps while we're at it, since they don't seem necessary for anything.
This commit is contained in:
@@ -112,7 +112,7 @@ class Upload < ActiveRecord::Base
|
||||
post.distribute_files
|
||||
if post.save
|
||||
CurrentUser.increment!(:post_upload_count)
|
||||
ugoira_service.process(post)
|
||||
ugoira_service.process(post) if is_ugoira?
|
||||
update_attributes(:status => "completed", :post_id => post.id)
|
||||
else
|
||||
update_attribute(:status, "error: " + post.errors.full_messages.join(", "))
|
||||
|
||||
Reference in New Issue
Block a user