Try a more magical way of doing nested transactions

This commit is contained in:
Ben Thorner
2021-04-13 09:10:59 +01:00
parent 6704be4021
commit db81c9c355
10 changed files with 32 additions and 55 deletions

View File

@@ -880,7 +880,6 @@ def populate_annual_billing_with_the_previous_years_allowance(year):
dao_create_or_update_annual_billing_for_year(service_id=row.id,
free_sms_fragment_limit=free_allowance[0],
financial_year_start=int(year))
db.session.commit()
@notify_command(name='populate-annual-billing-with-defaults')
@@ -915,4 +914,3 @@ def populate_annual_billing_with_defaults(year, missing_services_only):
for service in active_services:
set_default_free_allowance_for_service(service, year)
db.session.commit()