Code

Opened 8 years ago

Closed 8 years ago

#1598 closed defect (fixed)

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

Reported by: gsakkis@… Owned by: adrian
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: UI/UX:

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

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by adrian

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

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.