mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 09:21:39 -05:00
when ORM level changes are made (eg `my_model.my_column = my_value`), the ORM will read the column definition to see if it should apply any defaults.The updated_at columns that we use all define `onupdate=datetime.datetime.utcnow`. We can't patch this out as the function pointer to the original function has already been grabbed by this at import time - so freezegun or `mocker.patch` won't work. So we have to use the query syntax to set the `updated_at` timestamp in the DB without going through the ORM layer.