Opened 19 years ago

Closed 19 years ago

#1598 closed defect (fixed)

[magic-removal] References to get_object() instead of get()

Reported by: gsakkis@… Owned by: Adrian Holovaty
Component: Core (Other) Version: magic-removal
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

Description

I hit an exception using the Admin interface on the magic-removal branch ("'Manager' object has no attribute 'get_object'"), but the bug lies on the core framework. Grepping through the source, there are three references to 'get_object' that should be changed to 'get':

/home/george/magic-removal/django/db/models/fields/related.py: klass._default_manager.get_object(pk=field_data)
/home/george/magic-removal/django/db/models/manipulators.py: _ = self.opts.one_to_one_field.rel.to.get_model_module().get_object(lookup_kwargs)
/home/george/magic-removal/django/db/models/base.py: obj = self._default_manager.get_object(order_by=('_order',),

Cheers,
George

Change History (1)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [2644]) magic-removal: Fixed #1598 -- Removed some references to get_object()

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