From 4baa86e90d7070882faa8c5a888270fb583520ad Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 3 Oct 2019 21:43:40 -0500 Subject: [PATCH] fixed /time --- app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 3088a27..8fbcdeb 100644 --- a/app/routes.py +++ b/app/routes.py @@ -51,7 +51,7 @@ def time(): if lengths: lengths = lengths.split(',') strings = request.args.get('strings') if strings: strings = strings.split(',') - if len(lengths or []) + 1 != len(strings or []): + if (len(lengths or []) + len(strings or []) > 0) and (len(lengths or []) + 1 != len(strings or [])): return f'error: lengths ({len(lengths or [])}) and strings ({len(strings or [])}) arrays must be same length to process properly' if lengths: lengths = list(map(int, lengths)) reverse = request.args.get('reverse')