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

@ -25,17 +25,19 @@ def handle(req):
"""handle a request to the function """handle a request to the function
Args: Args:
req (str): request body req (str): request body
{ [nombre1, nombre2, ... nombreN]
p: prefijo del nombre,
g: genero del nombre,
a: año de nacimiento
}
""" """
nombres = []
try: 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: except Exception:
pass
if not nombres:
nombres = ["maria", "juan"] nombres = ["maria", "juan"]
chart = pygal.Line( chart = pygal.Line(