mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 00:15:15 +08:00
Revert "REFACTOR: remove unnecessary parentheses attempt 2 (follow-up on 154f503d
)"
This reverts commit 7db2dc717e
.
Commit breaks post edits for regular users.
This commit is contained in:
parent
1c6a2262b3
commit
d2a7f29595
|
@ -215,7 +215,8 @@ class Post < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def matches_recent_post?
|
def matches_recent_post?
|
||||||
$redis.get(unique_post_key)&.to_i != id
|
post_id = $redis.get(unique_post_key)
|
||||||
|
post_id != (nil) && post_id.to_i != (id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def raw_hash
|
def raw_hash
|
||||||
|
|
Loading…
Reference in New Issue
Block a user