Commit 3657e9cd authored by Janis Streib's avatar Janis Streib 🦉

FIX: model: correct vlan query

parent 3dd86f19
Pipeline #130043 passed with stages
in 6 minutes and 42 seconds
......@@ -379,7 +379,7 @@ class VLAN(DBObject):
@classmethod
def get_by_bcd(cls, db, connection, bcd_name):
res = db.execute(connection, "select nd_vlan.id, nd_bcd.key_nr as bcd, nd_vlan.descr as description, nd_net_instnc.name as net_instnc from nd_vlan inner join nd_bcd on nd_vlan.nd_bcd_key_nr = nd_bcd.key_nr inner join nd_net_instnc on nd_vlan.nd_net_instnc_key_nr = nd_net_instnc.key_nr WHERE nd_bcd.name = {name}", {'name': name})
res = db.execute(connection, "select nd_vlan.id, nd_bcd.key_nr as bcd, nd_vlan.descr as description, nd_net_instnc.name as net_instnc from nd_vlan inner join nd_bcd on nd_vlan.nd_bcd_key_nr = nd_bcd.key_nr inner join nd_net_instnc on nd_vlan.nd_net_instnc_key_nr = nd_net_instnc.key_nr WHERE nd_bcd.name = {name}", {'name': bcd_name})
if len(res) == 0:
return None
return [cls(**r) for r in res]
......
......@@ -33,7 +33,7 @@ class MacFinderJob(object):
return self.status
@macfinder.route('create_job', methods=['post'])
@macfinder.route('/create_job', methods=['post'])
@login_required
def create_job():
if not len(format_mac(request.json['mac'])) == 17:
......
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