Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8110 -- Allow for AdminLogNode's render to be called more than…

… once.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9feebb10f91cb7faf00b6a83ea5a7d03f739e421 1 parent 51d101b
Karen Tracey authored October 17, 2008

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

  1. 7  django/contrib/admin/templatetags/log.py
7  django/contrib/admin/templatetags/log.py
@@ -14,9 +14,10 @@ def render(self, context):
14 14
         if self.user is None:
15 15
             context[self.varname] = LogEntry.objects.all().select_related('content_type', 'user')[:self.limit]
16 16
         else:
17  
-            if not self.user.isdigit():
18  
-                self.user = context[self.user].id
19  
-            context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related('content_type', 'user')[:self.limit]
  17
+            user_id = self.user
  18
+            if not user_id.isdigit():
  19
+                user_id = context[self.user].id
  20
+            context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:self.limit]
20 21
         return ''
21 22
 
22 23
 class DoGetAdminLog:

0 notes on commit 9feebb1

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