fix Evitar error si la solicitud no indica centro

parent 97893c58
Pipeline #520 failed with stage
in 0 seconds
......@@ -132,9 +132,13 @@ class ProyectoForm(forms.ModelForm):
"estudio", _("Los PIET deben estar vinculados a un estudio.")
)
nip_coordinadores = [
f"{p.nip_coordinador}" for p in estudio.planes.all() if p.nip_coordinador
]
if estudio:
nip_coordinadores = [
f"{p.nip_coordinador}"
for p in estudio.planes.all()
if p.nip_coordinador
]
if (
programa.nombre_corto == "PIET"
and self.instance.user.username not in nip_coordinadores
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment