FIX: pointless error in log when failing to save post
rate_limit gets fired for rollback on in which case there is not post_number
This commit is contained in:
parent
82a6176b08
commit
157b118559
|
@ -90,7 +90,7 @@ class Post < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def limit_posts_per_day
|
||||
if user.first_day_user? && post_number > 1
|
||||
if user.first_day_user? && post_number && post_number > 1
|
||||
RateLimiter.new(user, "first-day-replies-per-day", SiteSetting.max_replies_in_first_day, 1.day.to_i)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue