Arreglado el historico

This commit is contained in:
Roberto Alsina 2022-07-19 16:14:40 -03:00
parent ac621f63aa
commit 504698c98d
1 changed files with 9 additions and 7 deletions

View File

@ -26,16 +26,18 @@ def handle(req):
Args:
req (str): request body
{
p: prefijo del nombre,
g: genero del nombre,
a: año de nacimiento
}
[nombre1, nombre2, ... nombreN]
"""
nombres = []
try:
nombres = [remove_accents(req.strip().lower()) for x in req.split(",")]
nombres = loads(req)
nombres = [remove_accents(x.strip().lower()) for x in nombres]
nombres = [n for n in nombres if n]
except Exception:
pass
if not nombres:
nombres = ["maria", "juan"]
chart = pygal.Line(