From e2691569258cdd15019f095b9176df143c562162 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Wed, 27 Nov 2024 15:46:54 +0100
Subject: [PATCH] fix socketio emits from database event listeners
---
app/models/event_listeners.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/models/event_listeners.py b/app/models/event_listeners.py
index 33ae5094..115f2a73 100644
--- a/app/models/event_listeners.py
+++ b/app/models/event_listeners.py
@@ -43,7 +43,7 @@ def resource_after_delete(mapper, connection, resource):
}
]
room = f'/users/{resource.user_hashid}'
- socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
+ socketio.emit('patch_user', jsonpatch, room=room)
def cfa_after_delete(mapper, connection, cfa):
@@ -55,7 +55,7 @@ def cfa_after_delete(mapper, connection, cfa):
}
]
room = f'/users/{cfa.corpus.user.hashid}'
- socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
+ socketio.emit('patch_user', jsonpatch, room=room)
def resource_after_insert(mapper, connection, resource):
@@ -70,7 +70,7 @@ def resource_after_insert(mapper, connection, resource):
}
]
room = f'/users/{resource.user_hashid}'
- socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
+ socketio.emit('patch_user', jsonpatch, room=room)
def cfa_after_insert(mapper, connection, cfa):
@@ -84,7 +84,7 @@ def cfa_after_insert(mapper, connection, cfa):
}
]
room = f'/users/{cfa.corpus.user.hashid}'
- socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
+ socketio.emit('patch_user', jsonpatch, room=room)
def resource_after_update(mapper, connection, resource):
@@ -110,7 +110,7 @@ def resource_after_update(mapper, connection, resource):
)
if jsonpatch:
room = f'/users/{resource.user_hashid}'
- socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
+ socketio.emit('patch_user', jsonpatch, room=room)
def job_after_update(mapper, connection, job):