Opened 4 years ago

Closed 4 years ago

#18236 closed Uncategorized (wontfix)

keyword parameter naming collision with get_object_or_404

Reported by: anonymous Owned by: nobody
Component: Core (Other) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


A model with a field named "klass" breaks get_object_or_404.

Change History (1)

comment:1 Changed 4 years ago by akaariai

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

You can wrap the klass='someclass' filter into django.db.models.Q(klass='someclass') and things should work. So, instead of:



from django.db.models import Q

I am marking this as wontfix, as this condition is IMO rare enough to not warrant any fixes.

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