def save_event(action, path, source_ip, query, data, role_id): EventLog.emit(action, path, source_ip=source_ip, query=query, data=data, role_id=role_id) db.session.commit()