mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue