Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.0.X] Fixed #8110 -- Allow for AdminLogNode's render to be called m…

…ore than once.

Backport of [9233] from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 36e90e57368a1d9474565a932dfc921a86f7a989 1 parent 4537f33
@kmtracey kmtracey authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/contrib/admin/templatetags/log.py
View
7 django/contrib/admin/templatetags/log.py
@@ -14,9 +14,10 @@ def render(self, context):
if self.user is None:
context[self.varname] = LogEntry.objects.all().select_related('content_type', 'user')[:self.limit]
else:
- if not self.user.isdigit():
- self.user = context[self.user].id
- context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related('content_type', 'user')[:self.limit]
+ user_id = self.user
+ if not user_id.isdigit():
+ user_id = context[self.user].id
+ context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:self.limit]
return ''
class DoGetAdminLog:
Please sign in to comment.
Something went wrong with that request. Please try again.