File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,19 @@ def test_conn():
9090 exit (1 )
9191
9292def gen_script_from_template (entity ,template ):
93+ dataStatus = 0
94+ if 'dataStatus' in entity ['payload' ].keys ():
95+ dataStatus = entity ['payload' ]['dataStatus' ]
96+ elif 'dataStatus' in entity ['payload' ]['identity' ]:
97+ dataStatus = entity ['payload' ]['identity' ]['dataStatus' ]
9398 data = {
9499 'domain' :u .config ('domain' ),
95100 'base' : u .config ('base' ),
96101 'dn' : compose_dn (entity ),
97102 'path' : dn_superior (compose_dn (entity )),
98103 'e' : u .make_entry_array (entity ),
99104 'config' : u .get_config (),
100- 'dataStatus' : entity [ 'payload' ][ ' dataStatus' ]
105+ 'dataStatus' : dataStatus
101106 }
102107
103108 environment = jinja2 .Environment (loader = FileSystemLoader ("../ps1_templates/" ))
You can’t perform that action at this time.
0 commit comments