﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1313	[patch] removed use of klass from admin/models.py and get_object from db/models/fields/__init__.py	jpaulofarias at gmail dot com	Adrian Holovaty	"Removed those two usages and replaced klass with model and get_object with get.

{{{
Index: django/contrib/admin/models.py
===================================================================
--- django/contrib/admin/models.py	(revision 2216)
+++ django/contrib/admin/models.py	(working copy)
@@ -9,7 +9,7 @@
 
 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):
Index: django/db/models/fields/__init__.py
===================================================================
--- django/db/models/fields/__init__.py	(revision 2216)
+++ django/db/models/fields/__init__.py	(working copy)
@@ -32,7 +32,7 @@
     ""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():
}}}"	defect	closed	contrib.admin	magic-removal	normal	fixed	admin, db		Accepted	1	0	0	0	0	0
