Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#14870 closed (fixed)

Do not catch all AttributeErrors in CustomRouter.allow_syncdb and friends

Reported by: jonash Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

Use hasattr instead.

Attachments (1)

router-hasattr.patch (2.2 KB) - added by jonash 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by jonash

comment:1 Changed 5 years ago by Alex

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

(In [14857]) Fixed #14870 -- don't catch AttributeErrors in database router methods, instead check that the method itself exists. Thanks to jonash for the patch.

comment:2 Changed 5 years ago by Alex

(In [14858]) [1.2.X] Fixed #14870 -- don't catch AttributeErrors in database router methods, instead check that the method itself exists. Thanks to jonash for the patch. Backport of [14857].

comment:3 Changed 5 years ago by ramiro

(In [15201]) Enhanced tests for r14857 added in r15185. Refs #14870. Thanks Harm Geerts.

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