1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

[full-history]

* Fixed a little logical error with kwargs



git-svn-id: http://code.djangoproject.com/svn/django/branches/full-history@3765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Uroš Trebec 2006-09-17 09:16:35 +00:00
parent 19ed25e2e6
commit dbdbf1735e

View File

@ -25,11 +25,11 @@ class ChangeLogManager(models.Manager):
"""
Returns 'current-offset' revision of the 'object'
"""
if not kwargs['offset']: offset=0
if not kwargs or not kwargs['offset']: offset=0
ct = ContentType.objects.get_for_model(object)
if kwargs['revision']:
if kwargs and kwargs['revision']:
return self.get_query_set().filter(
content_type=ct.id).filter(
object_id=object.id).filter(