no longer add an annual billing entry creating a service

this is now handled by a separate call from the admin app
This commit is contained in:
Leo Hemsted
2017-12-06 11:01:18 +00:00
parent 8cd422ebea
commit 4cdcc4e035
6 changed files with 33 additions and 80 deletions

View File

@@ -41,7 +41,6 @@ from app.models import (
)
from app.statsd_decorators import statsd
from app.utils import get_london_month_from_utc_column, get_london_midnight_in_utc
from app.dao.annual_billing_dao import dao_insert_annual_billing_for_this_year
DEFAULT_SERVICE_PERMISSIONS = [
SMS_TYPE,
@@ -155,7 +154,7 @@ def dao_fetch_service_by_id_and_user(service_id, user_id):
@transactional
@version_class(Service)
def dao_create_service(service, user, free_sms_fragment_limit, service_id=None, service_permissions=None):
def dao_create_service(service, user, service_id=None, service_permissions=None):
# the default property does not appear to work when there is a difference between the sqlalchemy schema and the
# db schema (ie: during a migration), so we have to set sms_sender manually here. After the GOVUK sms_sender
# migration is completed, this code should be able to be removed.
@@ -177,7 +176,6 @@ def dao_create_service(service, user, free_sms_fragment_limit, service_id=None,
# do we just add the default - or will we get a value from FE?
insert_service_sms_sender(service, current_app.config['FROM_NUMBER'])
dao_insert_annual_billing_for_this_year(service, free_sms_fragment_limit)
db.session.add(service)