magic-removal: Fixed #1313 -- Bugfixes for magic-removal. Thanks, jpaulofarias

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-02-02 03:18:09 +00:00
parent 171c1a5a06
commit 52b2dd620f
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ DELETION = 3
class LogEntryManager(models.Manager):
def log_action(self, user_id, content_type_id, object_id, object_repr, action_flag, change_message=''):
e = self.klass(None, None, user_id, content_type_id, object_id, object_repr[:200], action_flag, change_message)
e = self.model(None, None, user_id, content_type_id, object_id, object_repr[:200], action_flag, change_message)
e.save()
class LogEntry(models.Model):

View File

@ -32,7 +32,7 @@ def manipulator_validator_unique(f, opts, self, field_data, all_data):
"Validates that the value is unique for this field."
lookup_type = f.get_validator_unique_lookup_type()
try:
old_obj = self.manager.get_object(**{lookup_type: field_data})
old_obj = self.manager.get(**{lookup_type: field_data})
except ObjectDoesNotExist:
return
if getattr(self, 'original_object', None) and self.original_object._get_pk_val() == old_obj._get_pk_val():