From 8afdf2ac818c7eec3f2f26e5e4601678c3fc36f2 Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Tue, 26 Nov 2024 15:48:06 +0000 Subject: [PATCH] Update account sponsorship listing only if changes occur --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index 5915304..df9fc5f 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -32,7 +32,7 @@ def self.import_from_repos logins.map(&:downcase).each do |login| account = Account.find_or_create_by(login: login) - account.update(has_sponsors_listing: true) + account.update(has_sponsors_listing: true) if account.changed? end end