++vpn network

This commit is contained in:
Nico Schottelius 2020-12-13 13:28:43 +01:00
commit cf948b03a8
7 changed files with 65 additions and 62 deletions

View file

@ -39,4 +39,6 @@ def allowed_vpn_network_reservation_size():
max_reservations=2**(F('subnetwork_mask')-F('network_mask'))).filter(
num_reservations__lt=F('max_reservations'))
return set([ pool.subnetwork_mask for pool in pools ])
# Need to return set of tuples, see
# https://docs.djangoproject.com/en/3.1/ref/models/fields/#field-choices
return set([ (pool.subnetwork_mask, pool.subnetwork_mask) for pool in pools ])