Django

Code

Changeset 3765

Show
Ignore:
Timestamp:
09/17/06 04:16:35 (2 years ago)
Author:
utrebec
Message:

[full-history]
* Fixed a little logical error with kwargs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/full-history/django/contrib/history/models.py

    r3640 r3765  
    2626        Returns 'current-offset' revision of the 'object'  
    2727        """ 
    28         if not kwargs['offset']: offset=0 
     28        if not kwargs or not kwargs['offset']: offset=0 
    2929 
    3030        ct = ContentType.objects.get_for_model(object) 
    3131 
    32         if kwargs['revision']: 
     32        if kwargs and kwargs['revision']: 
    3333            return self.get_query_set().filter( 
    3434                content_type=ct.id).filter(