From f5c2676320fe945730079cbf43525782b038fea6 Mon Sep 17 00:00:00 2001 From: KlemenSpruk Date: Tue, 17 Oct 2023 14:20:23 +0200 Subject: [PATCH] bug fix for parent invite class and query manager (#154) --- django_project_base/base/event.py | 8 ++------ django_project_base/base/models.py | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/django_project_base/base/event.py b/django_project_base/base/event.py index 7f4bfd9d..f9a4b173 100644 --- a/django_project_base/base/event.py +++ b/django_project_base/base/event.py @@ -63,13 +63,9 @@ def trigger_changed(self, old_state=None, new_state=None, payload=None, **kwargs project_settings_manager = swapper.load_model("django_project_base", "ProjectSettings").objects for sender in set(AwsSes.list_sender_emails()) - ( - set( - project_settings_manager.objects.filter(name=EMAIL_SENDER_ID_SETTING_NAME).values_list( - "value", flat=True - ) - ) + set(project_settings_manager.filter(name=EMAIL_SENDER_ID_SETTING_NAME).values_list("value", flat=True)) | set( - project_settings_manager.objects.filter(name=EMAIL_SENDER_ID_SETTING_NAME).values_list( + project_settings_manager.filter(name=EMAIL_SENDER_ID_SETTING_NAME).values_list( "pending_value", flat=True ) ) diff --git a/django_project_base/base/models.py b/django_project_base/base/models.py index 476bf6db..f4677d32 100644 --- a/django_project_base/base/models.py +++ b/django_project_base/base/models.py @@ -345,6 +345,6 @@ class Meta: ] -class Invite(BaseProject): +class Invite(BaseInvite): class Meta: swappable = swapper.swappable_setting("django_project_base", "Invite")