Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/manipulators.py
View
4 django/db/models/manipulators.py
@@ -6,6 +6,7 @@
from django.db.models import signals
from django.utils.functional import curry
from django.utils.datastructures import DotExpandedDict, MultiValueDict
+from django.utils.text import capfirst
import types
def add_manipulators(sender):
@@ -291,9 +292,8 @@ def manipulator_validator_unique_together(field_name_list, opts, self, field_dat
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():
Please sign in to comment.
Something went wrong with that request. Please try again.