Commits

utr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 749337e

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

  • Participants
  • Parent commits e3c0c4d
  • Branches full-history

Comments (0)

Files changed (1)

File django/contrib/history/models.py

 	""" 
 	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(