mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
Rename database management functions.
Rename @transactional to @autocommit. Rename nested_transaction to tranaction.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from datetime import datetime
|
||||
|
||||
from app import db
|
||||
from app.dao.dao_utils import transactional
|
||||
from app.dao.dao_utils import autocommit
|
||||
from app.models import ServiceDataRetention
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ def fetch_service_data_retention_by_notification_type(service_id, notification_t
|
||||
return data_retention_list
|
||||
|
||||
|
||||
@transactional
|
||||
@autocommit
|
||||
def insert_service_data_retention(service_id, notification_type, days_of_retention):
|
||||
new_data_retention = ServiceDataRetention(service_id=service_id,
|
||||
notification_type=notification_type,
|
||||
@@ -38,7 +38,7 @@ def insert_service_data_retention(service_id, notification_type, days_of_retenti
|
||||
return new_data_retention
|
||||
|
||||
|
||||
@transactional
|
||||
@autocommit
|
||||
def update_service_data_retention(service_data_retention_id, service_id, days_of_retention):
|
||||
updated_count = ServiceDataRetention.query.filter(
|
||||
ServiceDataRetention.id == service_data_retention_id,
|
||||
|
||||
Reference in New Issue
Block a user