This commit is contained in:
r888888888
2017-05-30 12:13:08 -07:00
parent 3a49b3c54b
commit 6eb5a4c017
2 changed files with 3 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ class PostFlag < ActiveRecord::Base
def initialize_creator
self.creator_id ||= CurrentUser.id
self.creator_ip_addr ||= CurrentUser.ip_addr
self.creator_ip_addr = CurrentUser.ip_addr if creator_ip_addr == "127.0.0.1" || creator_ip_addr.blank?
end
def resolve!