mirror of https://github.com/veops/cmdb.git
fix(api): import CIType
This commit is contained in:
parent
33e58a658b
commit
10406942a0
|
@ -1362,9 +1362,13 @@ class CITypeTemplateManager(object):
|
||||||
rule.pop("id", None)
|
rule.pop("id", None)
|
||||||
rule.pop("created_at", None)
|
rule.pop("created_at", None)
|
||||||
rule.pop("updated_at", None)
|
rule.pop("updated_at", None)
|
||||||
|
rule.pop("relation", None)
|
||||||
|
|
||||||
rule['uid'] = current_user.uid
|
rule['uid'] = current_user.uid
|
||||||
|
|
||||||
|
if not rule.get('attributes'):
|
||||||
|
continue
|
||||||
|
|
||||||
existed = False
|
existed = False
|
||||||
for i in AutoDiscoveryCIType.get_by(type_id=ci_type.id, adr_id=rule['adr_id'], to_dict=False):
|
for i in AutoDiscoveryCIType.get_by(type_id=ci_type.id, adr_id=rule['adr_id'], to_dict=False):
|
||||||
if ((i.extra_option or {}).get('alias') or None) == (
|
if ((i.extra_option or {}).get('alias') or None) == (
|
||||||
|
|
Loading…
Reference in New Issue