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: if not interval and not unit:
return return
if interval == 'month': if unit == 'month':
unit *= 30 interval *= 30
elif interval == 'week': elif unit == 'week':
unit *= 7 interval *= 7
if unit > 90: if interval > 90:
raise ValidationError('Notification cannot be more than 90 days into the future.') raise ValidationError('Notification cannot be more than 90 days into the future.')