#14870 closed (fixed)
Do not catch all AttributeErrors in CustomRouter.allow_syncdb and friends
Reported by: | Jonas H. | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Use hasattr
instead.
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | router-hasattr.patch added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
(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.