mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
add a tiny bit of extra protection
This commit is contained in:
parent
4b449914b8
commit
4424fd81b8
1 changed files with 1 additions and 1 deletions
|
@ -700,7 +700,7 @@ SQL
|
||||||
topic_user.destroy
|
topic_user.destroy
|
||||||
# we can not remove ourselves cause then we will end up adding
|
# we can not remove ourselves cause then we will end up adding
|
||||||
# ourselves in add_small_action
|
# ourselves in add_small_action
|
||||||
removed_by = Discourse.system_user if user.id == removed_by.id
|
removed_by = Discourse.system_user if user.id == removed_by&.id
|
||||||
add_small_action(removed_by, "removed_user", user.username)
|
add_small_action(removed_by, "removed_user", user.username)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue