From 52b2dd620f23f2c93230e03e113fbd4fb679394d Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 2 Feb 2006 03:18:09 +0000 Subject: [PATCH] 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 --- django/contrib/admin/models.py | 2 +- django/db/models/fields/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py index bade1110c0..a651c7b59c 100644 --- a/django/contrib/admin/models.py +++ b/django/contrib/admin/models.py @@ -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): diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index d78dadddac..7bcc01b0d7 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -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():