Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleith committed Dec 11, 2024
1 parent f3ef7ed commit 786e6ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/notifications/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def send_near_annual_limit_warning_email(service: Service, notification_type: No
message_limit_fr = "{:,}".format(service.email_annual_limit).replace(",", " ")
message_limit_en = service.email_annual_limit
message_type_fr = "courriels"
message_type_en = "emails"
message_type_en = "emails"
remaining_en = "{:,}".format(service.email_annual_limit - count_en)
remaining_fr = "{:,}".format(service.email_annual_limit - count_en).replace(",", " ")
else:
Expand Down
4 changes: 3 additions & 1 deletion app/service/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ def _warn_service_users_about_annual_limit_change(service: Service, notification
"service_name": service.name,
"message_type_en": "emails" if notification_type == EMAIL_TYPE else "text messages",
"message_type_fr": "courriels" if notification_type == EMAIL_TYPE else "messages texte",
"message_limit_en": "{:,}".format(service.email_annual_limit) if notification_type == EMAIL_TYPE else "{:,}".format(service.sms_annual_limit),
"message_limit_en": "{:,}".format(service.email_annual_limit)
if notification_type == EMAIL_TYPE
else "{:,}".format(service.sms_annual_limit),
"message_limit_fr": "{:,}".format(
service.email_annual_limit if notification_type == EMAIL_TYPE else service.sms_annual_limit
).replace(",", " "),
Expand Down
1 change: 1 addition & 0 deletions migrations/versions/0471_edit_limit_emails2.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
]
)


def upgrade():
conn = op.get_bind()

Expand Down

0 comments on commit 786e6ea

Please sign in to comment.