Normalize Network Organization field name
This commit is contained in:
parent
79b7b2f8cd
commit
22d0726175
2 changed files with 24 additions and 1 deletions
23
manager/migrations/0042_auto_20190202_1318.py
Normal file
23
manager/migrations/0042_auto_20190202_1318.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 2.1.5 on 2019-02-02 13:18
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('manager', '0041_auto_20190202_0759'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='network',
|
||||
old_name='organizations',
|
||||
new_name='organization',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='device',
|
||||
name='wifi',
|
||||
field=models.ManyToManyField(blank=True, to='manager.Wifi'),
|
||||
),
|
||||
]
|
|
@ -212,7 +212,7 @@ def editdevice(request, device_id):
|
|||
if not device:
|
||||
return redirect("/devices/")
|
||||
|
||||
for subnet in Network.objects.filter(organizations=device[0].organization):
|
||||
for subnet in Network.objects.filter(organization=device[0].organization):
|
||||
subnets.add(subnet)
|
||||
|
||||
for wifi in Wifi.objects.filter(organization=device[0].organization):
|
||||
|
|
Loading…
Reference in a new issue