fixes #2027
This commit is contained in:
@@ -37,7 +37,6 @@ class Upload < ActiveRecord::Base
|
|||||||
def validate_md5_uniqueness
|
def validate_md5_uniqueness
|
||||||
md5_post = Post.find_by_md5(md5)
|
md5_post = Post.find_by_md5(md5)
|
||||||
if md5_post
|
if md5_post
|
||||||
merge_tags(md5_post)
|
|
||||||
raise "duplicate: #{md5_post.id}"
|
raise "duplicate: #{md5_post.id}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -119,11 +118,6 @@ class Upload < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def merge_tags(post)
|
|
||||||
post.tag_string += " #{tag_string}"
|
|
||||||
post.save
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module FileMethods
|
module FileMethods
|
||||||
|
|||||||
Reference in New Issue
Block a user