Skip to content
Snippets Groups Projects
Commit 3bc789c8 authored by joe's avatar joe
Browse files

Repairing case in which audit logs contain no data

parent 72731997
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,7 @@ class SqlAlchemyDbInterface(base.DbInterface): ...@@ -73,6 +73,7 @@ class SqlAlchemyDbInterface(base.DbInterface):
def add_audit(self, entity_name, object_name, operation, def add_audit(self, entity_name, object_name, operation,
data, auth_ctx, session): data, auth_ctx, session):
ins = self._objs['audit_table'].insert() ins = self._objs['audit_table'].insert()
if data is not None:
data = self._schema.get_entity(entity_name).to_net(data) data = self._schema.get_entity(entity_name).to_net(data)
session.execute(ins, {'entity': entity_name, session.execute(ins, {'entity': entity_name,
'object': object_name, 'object': object_name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment