Commit 3daa9340 authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type_getSecurityCategoryFromSelf: Move loop-invariant out of loop

Also, modernise syntax a bit.
parent 5ba514bc
...@@ -20,12 +20,11 @@ The parameters are ...@@ -20,12 +20,11 @@ The parameters are
NOTE: for now, this script requires proxy manager NOTE: for now, this script requires proxy manager
""" """
category_list = []
if ob is None: if ob is None:
return [] return []
for base_category in base_category_list: value = ob.getRelativeUrl()
category_list.append({base_category: ob.getRelativeUrl()}) return [
{base_category: value}
return category_list for base_category in base_category_list
]
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