Browse Source

Casting the value received from the Web Server in the request object if it is a string

pull/2443/head
Ibirisol Fontes 7 years ago committed by Ibirisol
parent
commit
1d9140aa3c
  1. 2
      flask/app.py

2
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

Loading…
Cancel
Save