Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
Fix self refs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cramer authored and David Cramer committed Dec 16, 2009
1 parent 202fce9 commit 366d4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pastethat/pastes/models.py
Expand Up @@ -97,9 +97,9 @@ def __unicode__(self):
def can_delete(self, request):
if request.user.is_authenticated() and not (paste.author == request.user or request.user.has_perm('pastes.delete_paste')):
return False
elif str(paste.id) not in request.session.getlist('pastes'):
elif str(self.id) not in request.session.getlist('pastes'):
return False
elif paste.post_date < datetime.datetime.now()-datetime.timedelta(days=1) and not request.user.has_perm('pastes.delete_paste'):
elif self.post_date < datetime.datetime.now()-datetime.timedelta(days=1) and not request.user.has_perm('pastes.delete_paste'):
return False
return True

Expand Down

0 comments on commit 366d4ed

Please sign in to comment.