Skip to content

Commit

Permalink
Skip sending signals in test env until async is supported
Browse files Browse the repository at this point in the history
SDESK-7441
  • Loading branch information
eos87 committed Nov 27, 2024
1 parent 3fb1104 commit 12d4427
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/archive/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,13 +868,18 @@ def update(self, id, updates, original):

# send signal
# TODO-ASYNC: Support async signals
signals.item_update.send(self, updates=updates, original=original)
superdesk_testing = get_app_config("SUPERDESK_TESTING", False)
if not superdesk_testing:
signals.item_update.send(self, updates=updates, original=original)

super().update(id, updates, original)

updated = copy(original)
updated.update(updates)
signals.item_updated.send(self, item=updated, original=original)

# TODO-ASYNC: Support async signals
if not superdesk_testing:
signals.item_updated.send(self, item=updated, original=original)

if "marked_for_user" in updates:
# TODO-ASYNC: Support async (see superdesk.tests.markers.requires_eve_resource_async_event)
Expand Down

0 comments on commit 12d4427

Please sign in to comment.