From 026bfe7c69fa0260059cd1c6547a0fee184d8574 Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Mon, 29 Jul 2013 16:03:50 -0700 Subject: [PATCH] allow NetworkSliver.ip to be null, fix NO_OBSERVER define --- planetstack/core/models/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planetstack/core/models/network.py b/planetstack/core/models/network.py index 660107f..66c2742 100644 --- a/planetstack/core/models/network.py +++ b/planetstack/core/models/network.py @@ -7,7 +7,7 @@ from django.contrib.contenttypes import generic # If true, then IP addresses will be allocated by the model. If false, then # we will assume the observer handles it. -#NO_OBSERVER=True +NO_OBSERVER=False class NetworkTemplate(PlCoreBase): VISIBILITY_CHOICES = (('public', 'public'), ('private', 'private')) @@ -44,7 +44,7 @@ class Network(PlCoreBase): class NetworkSliver(PlCoreBase): network = models.ForeignKey(Network) sliver = models.ForeignKey(Sliver) - ip = models.GenericIPAddressField(help_text="Sliver ip address", blank=True) + ip = models.GenericIPAddressField(help_text="Sliver ip address", blank=True, null=True) def save(self, *args, **kwds): if (not self.ip) and (NO_OBSERVER): -- 2.43.0