1
0
Ответвление 0
setting "end" to an empty field was resulting in the field not being
changed.
Этот коммит содержится в:
boyska 2020-04-23 22:54:39 +02:00
родитель 3fe43cdaf7
коммит 51de003d95

Просмотреть файл

@ -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