Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Added warning if dates do not make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
gdujany committed May 12, 2015
1 parent cbfa5c1 commit 5182f34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Condorcet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ def notVoter():
@admin_required
def admin():
current_config = getConfigDict()
if current_config['CLOSE_ELECTION'] > current_config['VIEW_RESULTS']:
flash(('The publish date is before the close election date'), 'error') # noqa
if current_config['START_ELECTION'] > current_config['VIEW_RESULTS']:
flash(('The publish date is before the start election date'), 'error') # noqa
if current_config['START_ELECTION'] > current_config['CLOSE_ELECTION']:
flash(('The start date is after the close election date'), 'error') # noqa
return render_template('admin.html',
current_config=current_config)

Expand Down

0 comments on commit 5182f34

Please sign in to comment.