mirror of
https://github.com/discourse/discourse.git
synced 2025-06-28 06:52:51 +08:00
DEV: Avoid creating system message when system user initiates restore (#30027)
There is no point creating a message for the system user since it is a non-human user.
This commit is contained in:

committed by
GitHub

parent
746d145258
commit
44a81069ac
@ -144,6 +144,8 @@ module BackupRestore
|
|||||||
end
|
end
|
||||||
|
|
||||||
def notify_user
|
def notify_user
|
||||||
|
return if @success && @user_id == Discourse::SYSTEM_USER_ID
|
||||||
|
|
||||||
if user = User.find_by_email(@user_info[:email])
|
if user = User.find_by_email(@user_info[:email])
|
||||||
log "Notifying '#{user.username}' of the end of the restore..."
|
log "Notifying '#{user.username}' of the end of the restore..."
|
||||||
status = @success ? :restore_succeeded : :restore_failed
|
status = @success ? :restore_succeeded : :restore_failed
|
||||||
|
Reference in New Issue
Block a user