objects: don't allow to update create_at and update_at
Those fields are managed by sqlalchemy layer, we should not allow to update them via OVO. Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db Change-Id: Ica8f50c45eb482e7a48d9b5b2b997cf9133b3100
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user