mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
FIX: Avoid duplicate problem admin notices (#29329)
As part of #29272 we made a unique index work on PG13 by introducing a dummy string to represent "NULL". We missed one spot, leading to a potential for duplicate admin notices for problems without a target. This fixes that.
This commit is contained in:
parent
f8b0c33567
commit
f31f8cc15f
@ -62,7 +62,7 @@ class ProblemCheckTracker < ActiveRecord::Base
|
|||||||
def sound_the_alarm
|
def sound_the_alarm
|
||||||
admin_notice.create_with(
|
admin_notice.create_with(
|
||||||
priority: check.priority,
|
priority: check.priority,
|
||||||
details: details.merge(target:),
|
details: details.merge(target: target || ProblemCheck::NO_TARGET),
|
||||||
).find_or_create_by(identifier:)
|
).find_or_create_by(identifier:)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user