Files
notifications-api/app
Alexey Bezhan 559639eb63 Verify that attribute exists on *History model when versioning objects
When createing a history instance of the updated object `create_history`
sets attributes using `setattr`. Since SQLAlchemy model instances are
Python objects they don't prevent new attributes being created by setattr,
which means that if history models are missing some of the columns the
attributes will still be assigned, but their values will not be persisted
by SQLAlchemy since database columns for them do not exist.

To avoid this, we check that the attribute is defined on the `history_cls`
and raise an error if it isn't.
2017-11-22 14:15:58 +00:00
..
2017-11-21 14:12:35 +00:00
2017-11-10 10:49:44 +00:00
2017-11-16 17:46:41 +00:00
2017-11-21 14:12:35 +00:00
2017-11-09 14:55:45 +00:00