mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
add updated_at to provider_details
it's set to utcnow from dao_update_provider_details
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import asc
|
||||
from app.dao.dao_utils import transactional
|
||||
from app.models import ProviderDetails, ProviderDetailsHistory
|
||||
@@ -21,6 +23,7 @@ def get_provider_details_by_notification_type(notification_type):
|
||||
@transactional
|
||||
def dao_update_provider_details(provider_details):
|
||||
provider_details.version += 1
|
||||
provider_details.updated_at = datetime.utcnow()
|
||||
history = ProviderDetailsHistory.from_original(provider_details)
|
||||
db.session.add(provider_details)
|
||||
db.session.add(history)
|
||||
|
||||
Reference in New Issue
Block a user