We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce4f006 commit 2e7c75eCopy full SHA for 2e7c75e
openwisp_controller/config/migrations/0056_ow_zt-to-global.py
@@ -3,7 +3,7 @@
3
4
def change_owzt_to_global(apps, schema_editor):
5
Template = apps.get_model('config', 'Template')
6
- for template in Template.objects.all():
+ for template in Template.objects.filter(type='vpn',vpn__backend='openwisp_controller.vpn_backends.ZeroTier'):
7
config = json.loads(template.config)
8
if 'zerotier' in config:
9
for item in config.get('zerotier',[]):
@@ -15,4 +15,5 @@ class Migration(migrations.Migration):
15
16
operations = [
17
migrations.RunPython(change_owzt_to_global, reverse_code=migrations.RunPython.noop)
18
- ]
+ ]
19
+
0 commit comments