Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Fix bug where goal null was untippable; #893
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed May 2, 2013
1 parent 829730f commit a3087fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gittip/models/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def tips_receiving(self):
return self._tips_receiving.distinct("tips.tipper")\
.order_by("tips.tipper, tips.mtime DESC")

@property
def accepts_tips(self):
return (self.goal is None) or (self.goal >= 0)

@property
def valid_tips_receiving(self):
'''
Expand Down
2 changes: 1 addition & 1 deletion templates/participant.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h2>{{ participant.username }}
</tr>
</table>

{% if participant != user and participant.goal >= 0 %}
{% if (participant != user) and participant.accepts_tips %}
<div class="nav level-1">
{% if locked %}

Expand Down

0 comments on commit a3087fc

Please sign in to comment.