Network and WiFi controller: provisioning, configuration management and updates, (pull via openwisp-config or push via SSH), x509 PKI management and more. Mainly OpenWRT, but designed to work also on other systems.
-The issue occurs because the code assumes that self.master_subnet and self.master_subnet.subnet are always set, but in this case, they can be None. By adding a check at the beginning of the method, we ensure that a proper validation error is raised when the master subnet is empty or not set.
-The validation error will be caught and displayed in the UI instead of causing a 500 internal server error.
coverage: 98.225% (+0.001%) from 98.224%
when pulling 21ad1b965891c2fc14af414934961eb14e3c6d85 on subnetvalidation
into 23025093b7a1ecbf4c0f07ab9d0bd7c2c20bcac4 on master.
Fixes #866
-The issue occurs because the code assumes that self.master_subnet and self.master_subnet.subnet are always set, but in this case, they can be None. By adding a check at the beginning of the method, we ensure that a proper validation error is raised when the master subnet is empty or not set. -The validation error will be caught and displayed in the UI instead of causing a 500 internal server error.