diff options
-rw-r--r-- | askbot/views/users.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/askbot/views/users.py b/askbot/views/users.py index 19613838..e38b7f50 100644 --- a/askbot/views/users.py +++ b/askbot/views/users.py @@ -585,12 +585,13 @@ def user_recent(request, user, context): elif activity.activity_type == const.TYPE_ACTIVITY_PRIZE: award = activity.content_object - activities.append(AwardEvent( - time=award.awarded_at, - type=activity.activity_type, - content_object=award.content_object, - badge=award.badge, - )) + if award is not None:#todo: work around halfa$$ comment deletion + activities.append(AwardEvent( + time=award.awarded_at, + type=activity.activity_type, + content_object=award.content_object, + badge=award.badge, + )) activities.sort(key=operator.attrgetter('time'), reverse=True) |