Fix type error on interval check.

This commit is contained in:
Andrew 2022-09-25 11:17:44 -04:00
parent 8cada1c450
commit eaa68751b2

View File

@ -1700,7 +1700,7 @@ class PanelHandler(BaseHandler):
# only check for time if it's number of days # only check for time if it's number of days
if interval_type == "days": if interval_type == "days":
sch_time = bleach.clean(self.get_argument("time", None)) sch_time = bleach.clean(self.get_argument("time", None))
if interval > 30: if int(interval) > 30:
self.redirect( self.redirect(
"/panel/error?error=Invalid argument." "/panel/error?error=Invalid argument."
" Days must be 30 or fewer." " Days must be 30 or fewer."
@ -1868,7 +1868,7 @@ class PanelHandler(BaseHandler):
# only check for time if it's number of days # only check for time if it's number of days
if interval_type == "days": if interval_type == "days":
sch_time = bleach.clean(self.get_argument("time", None)) sch_time = bleach.clean(self.get_argument("time", None))
if interval > 30: if int(interval) > 30:
self.redirect( self.redirect(
"/panel/error?error=Invalid argument." "/panel/error?error=Invalid argument."
" Days must be 30 or fewer." " Days must be 30 or fewer."