Skip to content

Commit

Permalink
Sólo elimina inscripciones anuladas de las actividades en horario de …
Browse files Browse the repository at this point in the history
…taller
  • Loading branch information
iranzo committed Nov 15, 2024
1 parent e9b2633 commit 4de3c8f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions 3-elimina-inscripciones-anuladas.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@
for actividad in actividades:
myid = actividad["idActivitat"]
nombre = actividad["nom"]
horario = int(actividad["idNivell"])
if horario in [7, 8, 9, 10]:
inscritos = common.readjson(filename=f"{myid}")

inscritos = common.readjson(filename=f"{myid}")
actividadyusuarios[myid] = []

actividadyusuarios[myid] = []
for inscrito in inscritos:
colegiat = inscrito["colegiat"]["idColegiat"]
actividadyusuarios[myid].append(colegiat)

for inscrito in inscritos:
colegiat = inscrito["colegiat"]["idColegiat"]
actividadyusuarios[myid].append(colegiat)

if inscrito["estat"] == "INSCRESTANULADA":
ID = inscrito["idInscripcio"]
anuladas.append(ID)
if inscrito["estat"] == "INSCRESTANULADA":
ID = inscrito["idInscripcio"]
anuladas.append(ID)


anuladas = sorted(set(anuladas))
Expand Down

0 comments on commit 4de3c8f

Please sign in to comment.