Fix k, v names.
This commit is contained in:
parent
af05a3d6ba
commit
4dfbe5dba2
@ -213,8 +213,8 @@ class AccountResource(Resource):
|
||||
ns.abort(404, 'Account with id %d not found.' % account_id)
|
||||
|
||||
# SQLAlchemy objects ignore __dict__.update() with merge.
|
||||
for k, v in data.items():
|
||||
setattr(account, k, v)
|
||||
for key, value in data.items():
|
||||
setattr(account, key, value)
|
||||
|
||||
db.session.merge(account) # pylint: disable=no-member
|
||||
|
||||
|
@ -194,8 +194,8 @@ class OperationResource(Resource):
|
||||
# FIXME check account_id consistency.
|
||||
|
||||
# SQLAlchemy objects ignore __dict__.update() with merge.
|
||||
for k, v in data.items():
|
||||
setattr(operation, k, v)
|
||||
for key, value in data.items():
|
||||
setattr(operation, key, value)
|
||||
|
||||
db.session.merge(operation) # pylint: disable=no-member
|
||||
|
||||
|
@ -171,8 +171,8 @@ class ScheduledOperationResource(Resource):
|
||||
# FIXME check account_id consistency.
|
||||
|
||||
# SQLAlchemy objects ignore __dict__.update() with merge.
|
||||
for k, v in data.items():
|
||||
setattr(scheduled_operation, k, v)
|
||||
for key, value in data.items():
|
||||
setattr(scheduled_operation, key, value)
|
||||
|
||||
db.session.merge(scheduled_operation) # pylint: disable=no-member
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user