Skip to content

Commit

Permalink
Merge pull request #303 from laurapanzariello/develop
Browse files Browse the repository at this point in the history
remove a equipment associated to an as number
  • Loading branch information
Laura authored Nov 24, 2020
2 parents 248053f + a5108e4 commit 10c16e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions networkapi/equipamento/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ def delete(self):
for equipment_group in self.equipamentogrupo_set.all():
equipment_group.delete()

for asn_equipment in self.asnequipment_set.all():
asn_equipment.delete()

super(Equipamento, self).delete()

def remove(self, authenticated_user, equip_id):
Expand Down Expand Up @@ -835,6 +838,9 @@ def delete_v3(self):
for equipment_group in self.equipamentogrupo_set.all():
equipment_group.delete()

for asn_equipment in self.asnequipment_set.all():
asn_equipment.delete()

self.delete()

def create_v3(self, equipment):
Expand Down

0 comments on commit 10c16e9

Please sign in to comment.