Skip to content

Commit

Permalink
Fixed #8110 -- Allow for AdminLogNode's render to be called more than…
Browse files Browse the repository at this point in the history
… once.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
kmtracey committed Oct 17, 2008
1 parent 51d101b commit 9feebb1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django/contrib/admin/templatetags/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9feebb1

Please sign in to comment.