Commit 32a3edde authored by Jérome Perrin's avatar Jérome Perrin

administration: py3

parent 564207bc
......@@ -3,7 +3,9 @@ security_uid_field_list = [x + ("_" if x != "" else "") + "security_uid" for x i
security_uid_set_list = []
for security_uid_field in security_uid_field_list:
security_uid_set_list.append({getattr(x, security_uid_field) for x in context.z_get_referenced_security_uid_set_for(security_uid_field=security_uid_field)})
security_uid_set = reduce(lambda p, v: p.union(v), security_uid_set_list)
security_uid_set = set()
for s in security_uid_set_list:
security_uid_set = security_uid_set.union(s)
filtered_set = context.Base_filterSecurityUidDict(
portal.portal_catalog.getSQLCatalog(catalog_id).security_uid_dict,
security_uid_set
......
......@@ -19,12 +19,12 @@ def getSkinHash(skin, skin_container):
elif skin.meta_type in ('ERP5 Form', ):
try:
content = skin.formXML()
if isinstance(content, unicode):
if not isinstance(content, bytes):
content = content.encode('utf8', 'repr')
except AttributeError as e:
# This can happen with dead proxy fields.
content = "broken form %s" % e
content = 'ignore'
content = b'ignore'
m = hashlib.md5()
m.update(content)
content_hash = m.hexdigest()
......
......@@ -47,4 +47,4 @@ else:
response.setHeader('content-type', content_type)
response.setHeader('content-disposition', 'attachment; filename="' + filename + '"')
response.write(data)
raise Exception('profiling')
raise RuntimeError('profiling')
\ No newline at end of file
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