Skip to content

Commit 2e7c75e

Browse files
atlasatlas
authored andcommitted
Fixed changes requested
1 parent ce4f006 commit 2e7c75e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openwisp_controller/config/migrations/0056_ow_zt-to-global.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def change_owzt_to_global(apps, schema_editor):
55
Template = apps.get_model('config', 'Template')
6-
for template in Template.objects.all():
6+
for template in Template.objects.filter(type='vpn',vpn__backend='openwisp_controller.vpn_backends.ZeroTier'):
77
config = json.loads(template.config)
88
if 'zerotier' in config:
99
for item in config.get('zerotier',[]):
@@ -15,4 +15,5 @@ class Migration(migrations.Migration):
1515

1616
operations = [
1717
migrations.RunPython(change_owzt_to_global, reverse_code=migrations.RunPython.noop)
18-
]
18+
]
19+

0 commit comments

Comments
 (0)