From 40e7be7290328647464f492d26a08fa7a39dc3e6 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 7 Nov 2024 11:45:48 +0000 Subject: [PATCH] mypy ignore --- codeforlife/models/base_session_store.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codeforlife/models/base_session_store.py b/codeforlife/models/base_session_store.py index 8130019..332a5de 100644 --- a/codeforlife/models/base_session_store.py +++ b/codeforlife/models/base_session_store.py @@ -58,7 +58,7 @@ def associate_session_to_user( user_id: The user to associate. """ objects = self.get_user_class().objects # type: ignore[attr-defined] - session.user = objects.get(id=user_id) + session.user = objects.get(id=user_id) # type: ignore[attr-defined] def create_model_instance(self, data): try: @@ -70,7 +70,9 @@ def create_model_instance(self, data): model_class = self.get_model_class() try: - session = model_class.objects.get(user_id=user_id) + session = model_class.objects.get( + user_id=user_id, # type: ignore[misc] + ) except model_class.DoesNotExist: session = model_class.objects.get(session_key=self.session_key) self.associate_session_to_user(