[vpn] begin to introduce save() method
The save() and delete() method will create/manage the orders
This commit is contained in:
parent
1cf20a2cb6
commit
62d9ccbbef
1 changed files with 3 additions and 3 deletions
|
@ -173,11 +173,11 @@ class VPNNetwork(Product):
|
||||||
|
|
||||||
wireguard_public_key = models.CharField(max_length=48)
|
wireguard_public_key = models.CharField(max_length=48)
|
||||||
|
|
||||||
|
def save(self, *args, **kwargs):
|
||||||
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
def delete(self, *args, **kwargs):
|
def delete(self, *args, **kwargs):
|
||||||
self.network.status = 'free'
|
self.network.status = 'free'
|
||||||
self.network.save()
|
self.network.save()
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
print("deleted {}".format(self))
|
print("deleted {}".format(self))
|
||||||
|
|
||||||
# managing deletion
|
|
||||||
# - record free network (?)
|
|
||||||
|
|
Loading…
Reference in a new issue