|
@@ -68,12 +68,13 @@ class Configuration(PolymorphicModel):
|
|
|
|
|
|
def save(self, **kwargs):
|
|
|
self.clean()
|
|
|
- os = self.offersubscription
|
|
|
+ config = super(Configuration, self).save(**kwargs)
|
|
|
+ os = config.offersubscription
|
|
|
for offer_ip_pool in os.offer.offerippool_set.order_by('-to_assign'):
|
|
|
IPSubnet.objects.create(
|
|
|
- configuration=self,
|
|
|
+ configuration=config,
|
|
|
ip_pool=offer_ip_pool.ip_pool)
|
|
|
- return super(Configuration, self).save(**kwargs)
|
|
|
+ return config
|
|
|
|
|
|
class Meta:
|
|
|
verbose_name = 'configuration'
|