Merge "objects: don't allow to update create_at and update_at"

This commit is contained in:
Jenkins 2017-05-27 00:13:03 +00:00 committed by Gerrit Code Review
commit c707fefd3c
1 changed files with 2 additions and 0 deletions

View File

@ -25,3 +25,5 @@ def add_standard_attributes(cls):
# its own instance of list
cls.fields = cls.fields.copy()
cls.fields.update(STANDARD_ATTRIBUTES)
# those fields are updated by sqlalchemy itself
cls.fields_no_update += ('created_at', 'updated_at')