Skip to content

Commit

Permalink
mypy ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Nov 7, 2024
1 parent 3b0409e commit 40e7be7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions codeforlife/models/base_session_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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(
Expand Down

0 comments on commit 40e7be7

Please sign in to comment.