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

Commit

Permalink
Use computed property Team.status
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Aug 13, 2015
1 parent cf4b8d0 commit 2e9919b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gratipay/models/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def update_receiving(self, cursor=None):
@property
def status(self):
return { None: 'unreviewed'
, False: 'rejected'
, False: 'closed'
, True: 'approved'
}[self.is_approved]

Expand Down
4 changes: 1 addition & 3 deletions www/%team/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ title = name = team.name
{% block content %}
<div class="col0">
{% if team.is_approved in (None, False) %}
{% if team.is_approved == None %}unreviewed{% endif %}
{% if team.is_approved == False %}closed{% endif %} |
{{ team.homepage }}
{{ team.status }} | {{ team.homepage }}
{% else %}
<a href="{{ team.homepage }}">{{ team.homepage }}</a>
{% endif %} |
Expand Down

0 comments on commit 2e9919b

Please sign in to comment.