From 1d9140aa3ca668d4679c930f19d95471daf6be2f Mon Sep 17 00:00:00 2001 From: Ibirisol Fontes Date: Tue, 8 Aug 2017 14:13:22 -0300 Subject: [PATCH] Casting the value received from the Web Server in the request object if it is a string --- flask/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flask/app.py b/flask/app.py index 88ca433c..3873eadc 100644 --- a/flask/app.py +++ b/flask/app.py @@ -43,6 +43,8 @@ _sentinel = object() def _make_timedelta(value): if not isinstance(value, timedelta): + if isinstance(value, str): + value = int(value) return timedelta(seconds=value) return value