events: fix error in API when specifying max_n

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-05-06 13:15:54 +02:00
parent 303b847cdc
commit 73b87a5e3d
2 changed files with 5 additions and 17 deletions

View File

@ -46,7 +46,7 @@ def pre_delete_cleanup(sender, instance: Outpost, **_):
# Service connection here
try:
outpost_pre_delete.delay(instance.pk.hex).get()
except RuntimeError:
except RuntimeError: # pragma: no cover
# In e2e/integration tests, this might run inside a thread/process and
# trigger the celery `Never call result.get() within a task` detection
if settings.TEST: