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:
Sam 2015-08-19 16:28:04 +10:00
parent 82a6176b08
commit 157b118559
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class Post < ActiveRecord::Base
end end
def limit_posts_per_day 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) RateLimiter.new(user, "first-day-replies-per-day", SiteSetting.max_replies_in_first_day, 1.day.to_i)
end end
end end