mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
remove history-meta for templates, replace with hand-made history table
history-meta's dynamic magic is insufficient for templates, where we need to be able to refer to the specific history table to take advantage of sqlalchemy's relationship management (2/3rds of an ORM). So replace it with a custom made version table. Had to change the version decorator slightly for this
This commit is contained in:
@@ -189,7 +189,7 @@ def get_service_history(service_id):
|
||||
api_key_history = ApiKey.get_history_model().query.filter_by(service_id=service_id).all()
|
||||
api_keys_data = api_key_history_schema.dump(api_key_history, many=True).data
|
||||
|
||||
template_history = Template.get_history_model().query.filter_by(service_id=service_id).all()
|
||||
template_history = TemplateHistory.query.filter_by(service_id=service_id).all()
|
||||
template_data, errors = template_history_schema.dump(template_history, many=True)
|
||||
|
||||
events = Event.query.all()
|
||||
|
||||
Reference in New Issue
Block a user