From bdc019c7cf3c69e84dc0552603618f5e10a0f0e3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 16 Oct 2020 15:58:28 +0200 Subject: [PATCH] outposts: skip post_save during migrations and unittests --- passbook/outposts/signals.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/passbook/outposts/signals.py b/passbook/outposts/signals.py index fe710b0b7..d623678e1 100644 --- a/passbook/outposts/signals.py +++ b/passbook/outposts/signals.py @@ -18,6 +18,10 @@ def post_save_update(sender, instance: Model, **_): If an OutpostModel, or a model that is somehow connected to an OutpostModel is saved, we send a message down the relevant OutpostModels WS connection to trigger an update""" + if instance.__module__ == "django.db.migrations.recorder": + return + if instance.__module__ == "__fake__": + return outpost_post_save.delay(class_to_path(instance.__class__), instance.pk)