mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
move available provider logic to the service model
make sure it's in an accessible place so we don't end up duplicating our work
This commit is contained in:
@@ -541,6 +541,13 @@ class Service(db.Model, Versioned):
|
||||
'research_mode': self.research_mode
|
||||
}
|
||||
|
||||
def get_available_broadcast_providers(self):
|
||||
# There may be future checks here if we add, for example, platform admin level provider killswitches.
|
||||
if self.allowed_broadcast_provider:
|
||||
return [x for x in current_app.config['ENABLED_CBCS'] if x == self.allowed_broadcast_provider]
|
||||
else:
|
||||
return current_app.config['ENABLED_CBCS']
|
||||
|
||||
|
||||
class AnnualBilling(db.Model):
|
||||
__tablename__ = "annual_billing"
|
||||
|
||||
Reference in New Issue
Block a user