fix unit and interval transposition in schemas.py (#752) (#774)

This commit is contained in:
Ian Stahnke 2017-05-01 05:23:34 +10:00 committed by kevgliss
parent 6367a98134
commit 5c41dafc97
1 changed files with 5 additions and 5 deletions

View File

@ -38,13 +38,13 @@ def validate_options(options):
if not interval and not unit:
return
if interval == 'month':
unit *= 30
if unit == 'month':
interval *= 30
elif interval == 'week':
unit *= 7
elif unit == 'week':
interval *= 7
if unit > 90:
if interval > 90:
raise ValidationError('Notification cannot be more than 90 days into the future.')