Fix: typologies iTop sans org_id (DomaineApplicatif, Environnement, Zone, DomainLdap)
This commit is contained in:
parent
df4cd3be6f
commit
73cec814b6
@ -355,7 +355,7 @@ def sync_to_itop(db, itop_url, itop_user, itop_pass):
|
||||
rows = db.execute(text(f"SELECT name FROM {pc_table} ORDER BY name")).fetchall()
|
||||
for row in rows:
|
||||
if row.name.lower() not in existing_itop:
|
||||
r = client.create(itop_class, {"name": row.name, "org_id": "SELECT Organization WHERE name = 'MPCZ'"})
|
||||
r = client.create(itop_class, {"name": row.name})
|
||||
if r.get("code") == 0:
|
||||
stats["ref_created"] += 1
|
||||
existing_itop.add(row.name.lower())
|
||||
@ -367,7 +367,7 @@ def sync_to_itop(db, itop_url, itop_user, itop_pass):
|
||||
rows = db.execute(text("SELECT name FROM domain_ltd_list ORDER BY name")).fetchall()
|
||||
for row in rows:
|
||||
if row.name.lower() not in existing_ldap:
|
||||
r = client.create("DomainLdap", {"name": row.name, "org_id": "SELECT Organization WHERE name = 'MPCZ'"})
|
||||
r = client.create("DomainLdap", {"name": row.name})
|
||||
if r.get("code") == 0:
|
||||
stats["ref_created"] += 1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user