Opened 4 years ago

Closed 4 years ago

#17506 closed Cleanup/optimization (fixed)

Minor tidyup in session DB backend

Reported by: FunkyBob Owned by: nobody
Component: contrib.sessions Version: master
Severity: Normal Keywords: session
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


The ORM docs suggest using exists() can be more efficient than try:get()/except:

Here's a patch to do just that in the session DB backend.

Attachments (2)

session_db.patch (581 bytes) - added by FunkyBob 4 years ago.
session_db-1.patch (588 bytes) - added by FunkyBob 4 years ago.
Fixed as requested

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by FunkyBob

comment:1 Changed 4 years ago by lukeplant

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

Accepted, but the method needs to actually return the value - with your patch it returns None always. Once this is fixed the ticket can be marked 'ready for checkin'.

Changed 4 years ago by FunkyBob

Fixed as requested

comment:2 Changed 4 years ago by anonymous

  • Patch needs improvement unset

comment:3 Changed 4 years ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 4 years ago by julien

  • Resolution set to fixed
  • Status changed from new to closed

In [17390]:

(The changeset message doesn't reference this ticket)

Note: See TracTickets for help on using tickets.
Back to Top