Opened 2 years ago

Closed 2 days ago

#20203 closed Bug (fixed)

Impossible to have a descriptor named `objects` on an abstract model

Reported by: Alex Owned by: coldmind
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: me@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is because of https://github.com/django/django/blob/master/django/db/models/manager.py#L17 , in general the ORM supports having a different name for the default manager, but this blows up with abstract models, which is sad.

Change History (8)

comment:1 Changed 2 years ago by elektrrrus

  • Owner changed from nobody to elektrrrus
  • Status changed from new to assigned

comment:2 Changed 2 years ago by elektrrrus

  • Owner elektrrrus deleted
  • Status changed from assigned to new

comment:3 Changed 2 weeks ago by coldmind

  • Cc me@… added
  • Owner set to coldmind
  • Status changed from new to assigned
  • Version changed from 1.5 to master

I'm working on this issue

comment:5 Changed 9 days ago by timgraham

  • Triage Stage changed from Accepted to Ready for checkin

comment:6 Changed 2 days ago by Tim Graham <timograham@…>

In c0cf73a:

Refs #20203 -- Allowed adding custom default manager to the model state

If the only manager on the model is the default manager defined
by Django (objects = models.Manager()), this manager will not
be added to the model state. If it is custom, it needs to be
passed to the model state.

comment:7 Changed 2 days ago by Tim Graham <timograham@…>

In c31bf8c:

Refs #20203 -- Added tests to check inherited custom default manager

comment:8 Changed 2 days ago by timgraham

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.
Back to Top