diff --git a/larigira/timeform_base.py b/larigira/timeform_base.py index 06b5a75..5b91804 100644 --- a/larigira/timeform_base.py +++ b/larigira/timeform_base.py @@ -1,16 +1,10 @@ import logging - from datetime import datetime -from pytimeparse.timeparse import timeparse from flask_wtf import Form -from wtforms import ( - StringField, - validators, - SubmitField, - SelectMultipleField, - ValidationError, -) +from pytimeparse.timeparse import timeparse +from wtforms import (SelectMultipleField, StringField, SubmitField, + ValidationError, validators) from larigira.formutils import EasyDateTimeField @@ -123,6 +117,6 @@ def frequencyalarm_receive(form): obj["start"] = int(form.start.data.strftime("%s")) else: obj["start"] = 0 - if form.end.data: - obj["end"] = int(form.end.data.strftime("%s")) + + obj["end"] = int(form.end.data.strftime("%s")) if form.end.data else None return obj