DEV: Use Discourse::SYSTEM_USER_ID in fixtures/009_users (#24743)

I couldn't find where we created the system user and
this is why -- everywhere else in the app we reference
SYSTEM_USER_ID but here.
This commit is contained in:
Martin Brennan
2023-12-07 09:04:45 +10:00
committed by GitHub
parent c197f8c6ee
commit 7afb5fc481
8 changed files with 17 additions and 17 deletions

View File

@ -474,7 +474,7 @@ class Group < ActiveRecord::Base
group_users
.pluck(:user_id, :notification_level)
.each do |user_id, notification_level|
next if user_id == -1
next if user_id == Discourse::SYSTEM_USER_ID
next if user_id == topic.user_id
next if ignore_existing && TopicUser.where(user_id: user_id, topic_id: topic.id).exists?