mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-18 13:38:53 -04:00
pep8 fixes
no idea why the build/local pep8s weren't picking them up before. also excluded import order pep8
This commit is contained in:
@@ -201,10 +201,10 @@ def create_history(obj, history_cls=None):
|
||||
# not yet have a value before insert
|
||||
|
||||
elif isinstance(prop, RelationshipProperty):
|
||||
if hasattr(history, prop.key+'_id'):
|
||||
if hasattr(history, prop.key + '_id'):
|
||||
foreign_obj = getattr(obj, prop.key)
|
||||
# if it's a nullable relationship, foreign_obj will be None, and we actually want to record that
|
||||
data[prop.key+'_id'] = getattr(foreign_obj, 'id', None)
|
||||
data[prop.key + '_id'] = getattr(foreign_obj, 'id', None)
|
||||
|
||||
if not obj.version:
|
||||
obj.version = 1
|
||||
|
||||
Reference in New Issue
Block a user