mirror of
https://github.com/GSA/notifications-api.git
synced 2026-03-22 11:10:46 -04:00
Fixing up a couple of pull request comments
- python style if - renamed the relationships
This commit is contained in:
@@ -467,7 +467,7 @@ def provider_to_use(notification_type, notification_id):
|
||||
provider for provider in get_provider_details_by_notification_type(notification_type) if provider.active
|
||||
]
|
||||
|
||||
if len(active_providers_in_order) == 0:
|
||||
if not active_providers_in_order:
|
||||
current_app.logger.error(
|
||||
"{} {} failed as no active providers".format(notification_type, notification_id)
|
||||
)
|
||||
|
||||
@@ -200,7 +200,7 @@ class ProviderStatistics(db.Model):
|
||||
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
day = db.Column(db.Date, nullable=False)
|
||||
provider_id = db.Column(UUID(as_uuid=True), db.ForeignKey('provider_details.id'), index=True, nullable=False)
|
||||
provider_stats_to_provider = db.relationship(
|
||||
provider = db.relationship(
|
||||
'ProviderDetails', backref=db.backref('provider_stats', lazy='dynamic')
|
||||
)
|
||||
service_id = db.Column(UUID(as_uuid=True), db.ForeignKey('services.id'), index=True, nullable=False)
|
||||
@@ -215,7 +215,7 @@ class ProviderRates(db.Model):
|
||||
valid_from = db.Column(db.DateTime, nullable=False)
|
||||
rate = db.Column(db.Numeric(), nullable=False)
|
||||
provider_id = db.Column(UUID(as_uuid=True), db.ForeignKey('provider_details.id'), index=True, nullable=False)
|
||||
provider_rate_to_provider = db.relationship('ProviderDetails', backref=db.backref('provider_rates', lazy='dynamic'))
|
||||
provider = db.relationship('ProviderDetails', backref=db.backref('provider_rates', lazy='dynamic'))
|
||||
|
||||
|
||||
class ProviderDetails(db.Model):
|
||||
|
||||
Reference in New Issue
Block a user