anonymization: try to fix the deprecation warnings
Unfortunately, we cannot use bool(foobar) on xpath() results. bzr revid: p_christ@hol.gr-20110306154856-ajg11p9ysee1t4e4
This commit is contained in:
parent
ab69f51931
commit
5aa7042688
|
@ -295,9 +295,8 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||||
|
|
||||||
eview = etree.fromstring(res['arch'])
|
eview = etree.fromstring(res['arch'])
|
||||||
placeholder = eview.xpath("group[@name='placeholder1']")
|
placeholder = eview.xpath("group[@name='placeholder1']")
|
||||||
placeholder = len(placeholder) and placeholder[0] or None
|
if len(placeholder):
|
||||||
|
placeholder = placeholder[0]
|
||||||
if placeholder:
|
|
||||||
if step == 'new_window' and state == 'clear':
|
if step == 'new_window' and state == 'clear':
|
||||||
# clicked in the menu and the fields are not anonymized: warn the admin that backuping the db is very important
|
# clicked in the menu and the fields are not anonymized: warn the admin that backuping the db is very important
|
||||||
placeholder.addnext(etree.Element('field', {'name': 'msg', 'colspan': '4', 'nolabel': '1'}))
|
placeholder.addnext(etree.Element('field', {'name': 'msg', 'colspan': '4', 'nolabel': '1'}))
|
||||||
|
|
Loading…
Reference in New Issue