Ticket #1367: unique_together.diff
File unique_together.diff, 900 bytes (added by , 19 years ago) |
---|
-
django/db/models/manipulators.py
6 6 from django.db.models import signals 7 7 from django.utils.functional import curry 8 8 from django.utils.datastructures import DotExpandedDict, MultiValueDict 9 from django.utils.text import capfirst 9 10 import types 10 11 11 12 def add_manipulators(sender): … … 291 292 kwargs['%s__pk' % f.name] = field_val 292 293 else: 293 294 kwargs['%s__iexact' % f.name] = field_val 294 mod = opts.get_model_module()295 295 try: 296 old_obj = mod.get_object(**kwargs)296 old_obj = self.manager.get(**kwargs) 297 297 except ObjectDoesNotExist: 298 298 return 299 299 if hasattr(self, 'original_object') and self.original_object._get_pk_val() == old_obj._get_pk_val():