Opened 19 years ago
Closed 19 years ago
#1361 closed defect (fixed)
[patch] magic-removal: manipulators.py using model modules
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
these fix compile errors when adding things via the admin area.
Helios:/src/django_src/django/db/models ianh$ svn diff Index: manipulators.py =================================================================== --- manipulators.py (revision 2309) +++ manipulators.py (working copy) @@ -291,9 +291,8 @@ kwargs['%s__pk' % f.name] = field_val else: kwargs['%s__iexact' % f.name] = field_val - mod = opts.get_model_module() try: - old_obj = mod.get_object(**kwargs) + old_obj = self.manager.get(**kwargs) except ObjectDoesNotExist: return if hasattr(self, 'original_object') and self.original_object._get_pk_val() == old_obj._get_pk_val(): @@ -318,7 +317,7 @@ if lookup_type == 'date': lookup_kwargs['%s__day' % date_field.name] = date_val.day try: - old_obj = self.manager.get_object(**lookup_kwargs) + old_obj = self.manager.get(**lookup_kwargs) except ObjectDoesNotExist: return else:
Change History (2)
comment:1 by , 19 years ago
Summary: | magik: fix manipulators → [patch] magic-removal: manipulators.py using model modules |
---|
comment:2 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [2318]) magic-removal: Fixed #1361 -- Fixed old-style DB API usage in db/models/manipulators.py. Thanks, Ian Holsman