Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14513 closed (fixed)

Ordering Check in django/core/management/

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


django/core/management/, both in the current trunk and in 1.2.3
It says in the accompanying comment:

# Skip ordering in the format field1__field2 (FIXME: checking 
# this format would be nice, but it's a little fiddly). 

However, the actual check is for only one "_". Which leads fieldnames which contain underscores to not be checked for

The patch would be something like this:

<                 if '__' in field_name: 
>                 if '_' in field_name: 

I will go through some hoops to put up an actual patch here.

Attachments (1)

django-14513-e62b9ba4e02c.diff (2.0 KB) - added by vanschelven 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by vanschelven


comment:1 Changed 6 years ago by vanschelven

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by lrekucki

  • Component changed from Uncategorized to Database layer (models, ORM)
  • Triage Stage changed from Unreviewed to Ready for checkin

Tested, looks simple, marking for checkin.

comment:3 Changed 6 years ago by Alex

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

Fixed in [14315].

comment:4 Changed 6 years ago by SmileyChris

(In [14317]) [1.2.X] Fixed #14513 -- check fields with underscores for validity when ordering. Bonus points to Klaas van Schelven.

Backport from trunk (r14315)

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