Opened 5 years ago

Closed 5 years ago

#12693 closed (fixed)

Database routers need error checking on load

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

Description

If you attempt to load a database router which can't be found due to path or attribute issues - you will get an internal server error with a trace back that is long and confusing. It essentially points to the fact that "it can't import name connection" at various spots in the django code base. Attached is a patch which adds error checking which is modeled off the error checking in django.contrib.auth.

Attachments (1)

django_router_load_check.patch (1.1 KB) - added by dhageman 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by dhageman

comment:1 Changed 5 years ago by russellm

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

(In [12305]) Fixed #12693 -- Improved error handling when there is an error setting up the database router chain. Thanks to dhageman for the report and fix.

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