mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Remove NotificationHistory.template relationship
Relationship attribute is not used by the application code, so we can remove it without replacing it with a TemplateHistory one. This also updates the foreign key constraint to refer to the composite primary key for the TemplateHistory records.
This commit is contained in:
@@ -679,7 +679,7 @@ def sample_notification_history(
|
||||
notification_history = NotificationHistory(
|
||||
id=uuid.uuid4(),
|
||||
service=sample_template.service,
|
||||
template=sample_template,
|
||||
template_id=sample_template.id,
|
||||
template_version=sample_template.version,
|
||||
status=status,
|
||||
created_at=created_at,
|
||||
|
||||
@@ -73,7 +73,7 @@ def noti_hist(notify_db, template, status='delivered', billable_units=None, key_
|
||||
notification_history = NotificationHistory(
|
||||
id=uuid.uuid4(),
|
||||
service=template.service,
|
||||
template=template,
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
status=status,
|
||||
created_at=datetime.utcnow(),
|
||||
|
||||
Reference in New Issue
Block a user