One line waring for not allowed keywords
@@ -1363,14 +1363,18 @@ class MongoengineSocket:
"""
update = {}
+ not_allowed_keys = []
# create safe query with allowed keys only
# shouldn't be allowed to update status manually
for key, value in data.items():
if key not in ['procedure', 'program', 'status', 'task_id']: # FIXME: what else?
update[key] = value
else:
+ not_allowed_keys.append(key)
+
+ if not_allowed_keys:
logging.warning('Trying to update Procedre with none ' +
- 'allowed keyword: ({}={})'.format(key, value))
+ 'allowed keyword: {}'.format(not_allowed_keys))
modified_count = Procedure.objects(hash_index=hash_index).update(**update, modified_on=dt.utcnow())
