File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -273,13 +273,8 @@ def post_entity_categories(maps, **kwargs):
273273 required = []
274274
275275 if kwargs ["mds" ]:
276- try :
276+ if "sp_entity_id" in kwargs :
277277 ecs = kwargs ["mds" ].entity_categories (kwargs ["sp_entity_id" ])
278- except KeyError :
279- for ec_map in maps :
280- for attr in ec_map ["" ]:
281- restrictions [attr ] = None
282- else :
283278 for ec_map in maps :
284279 for key , (atlist , only_required ) in ec_map .items ():
285280 if key == "" : # always released
@@ -305,6 +300,10 @@ def post_entity_categories(maps, **kwargs):
305300
306301 for attr in attrs :
307302 restrictions [attr ] = None
303+ else :
304+ for ec_map in maps :
305+ for attr in ec_map ["" ]:
306+ restrictions [attr ] = None
308307
309308 return restrictions
310309
You can’t perform that action at this time.
0 commit comments