Skip to content

Commit

Permalink
Solucionando issue #100
Browse files Browse the repository at this point in the history
  • Loading branch information
Sansanto2000 committed Jun 12, 2023
1 parent 49bb9ec commit ede418d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/app/api/generate_fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ def api_generate_fits():
}
return json.jsonify(**data)

# Verificar que no se incluyen en MAIN-ID y/o SUFFIX ciertos caracteres problematicos para el nombramiento de archivos0: '\ / : * ? " < > |'
bad_caracteres = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
for metadata_dict in data_arr:
for caracter in bad_caracteres:
if((caracter in metadata_dict["MAIN-ID"]) or (caracter in metadata_dict["SUFFIX"])):
print("No se permite en MAIN-ID y/o SUFFIX el uso de los caracteres: "+str(bad_caracteres))
data = {
"status": False,
"status_code": 400,
"message": "No se permite en MAIN-ID y/o SUFFIX el uso de los caracteres: "+str(bad_caracteres)
}
return json.jsonify(**data)

# Verificar que no se repita el nombre de MAIN-ID_SUFFIX en 2 espectros distintos
objects = []
Expand Down

0 comments on commit ede418d

Please sign in to comment.