Skip to content

Commit

Permalink
Used SessionBase.__setitem__() in setdefault().
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm authored Mar 12, 2024
1 parent 3592e9f commit c925448
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/contrib/sessions/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def setdefault(self, key, value):
if key in self._session:
return self._session[key]
else:
self.modified = True
self._session[key] = value
self[key] = value
return value

def set_test_cookie(self):
Expand Down

0 comments on commit c925448

Please sign in to comment.