Commit 2f425ae2 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Fix migration file

Fix migration that caused creation of Subnet for networks that did not
had enabled the 'dhcp' option.
parent 356efa39
......@@ -10,7 +10,7 @@ class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
for network in orm.Network.objects.select_related('pool').all():
for network in orm.Network.objects.select_related('pool').filter(dhcp=True):
if network.subnet:
subnet = orm.Subnet.objects.create(network=network,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment