@property
def last_activity(self):
- return self.actions.order_by('-action_date')[0].action_date
+ try:
+ return self.actions.order_by('-action_date')[0].action_date
+ except:
+ return None
@property
def gravatar(self):
@true_if_is_super_or_staff
def can_reopen_question(self, question):
- return self == question.author and self.reputation >= settings.REP_TO_REOPEN_OWN
+ return self == question.author and self.reputation >= int(settings.REP_TO_REOPEN_OWN)
@true_if_is_super_or_staff
def can_delete_post(self, post):