Skip to content

Commit

Permalink
Socket notification for delete CO in ORG page
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 9, 2025
1 parent 62a8b40 commit b5e0da4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/api/collaboration.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ def delete_collaboration_api(co_identifier):
tag_identifiers = [tag.id for tag in collaboration.tags]

broadcast_collaboration_deleted(collaboration_id)
emit_socket(f"organisation_{collaboration.organisation_id}")

res = delete(Collaboration, collaboration_id)

_delete_orphan_tags(tag_identifiers)

broadcast_collaboration_deleted(collaboration_id)
return res


Expand Down Expand Up @@ -831,7 +832,10 @@ def delete_collaboration(collaboration_id):
confirm_collaboration_admin(collaboration_id)
tag_identifiers = _tag_identifiers(collaboration_id)

collaboration = Collaboration.query.filter(Collaboration.id == int(collaboration_id)).one()
emit_socket(f"organisation_{collaboration.organisation_id}")
broadcast_collaboration_deleted(collaboration_id)

res = delete(Collaboration, collaboration_id)

_delete_orphan_tags(tag_identifiers)
Expand Down

0 comments on commit b5e0da4

Please sign in to comment.