Fix - Al eliminar nivel educativo
This commit is contained in:
parent
06c32e56a8
commit
5c05417999
|
@ -1474,6 +1474,13 @@ class NivelesEducativos(BaseModel):
|
|||
|
||||
@classmethod
|
||||
def remove(cls, id):
|
||||
obj = NivelesEducativos.get(NivelesEducativos.id==int(id))
|
||||
q = Grupos.delete().where(Grupos.nivel==obj)
|
||||
try:
|
||||
q.execute()
|
||||
except IntegrityError:
|
||||
return False
|
||||
|
||||
q = NivelesEducativos.delete().where(NivelesEducativos.id==int(id))
|
||||
return bool(q.execute())
|
||||
|
||||
|
|
Loading…
Reference in New Issue