Ticket #17506: session_db-1.patch

File session_db-1.patch, 588 bytes (added by FunkyBob, 4 years ago)

Fixed as requested

  • django/contrib/sessions/backends/db.py

     
    2424            return {}
    2525
    2626    def exists(self, session_key):
    27         try:
    28             Session.objects.get(session_key=session_key)
    29         except Session.DoesNotExist:
    30             return False
    31         return True
     27        return Session.objects.filter(session_key=session_key).exists()
    3228
    3329    def create(self):
    3430        while True:
Back to Top