Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

magic-removal: Fixed #1367 -- Got unique_together validator working. …

…Thanks, Christopher Lenz

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2315 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 37942803b0f36d5ef6b2258915f8595ea8bdf992 1 parent ad24403
Adrian Holovaty authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/db/models/manipulators.py
4  django/db/models/manipulators.py
@@ -6,6 +6,7 @@
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,9 +292,8 @@ def manipulator_validator_unique_together(field_name_list, opts, self, field_dat
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():

0 notes on commit 3794280

Please sign in to comment.
Something went wrong with that request. Please try again.