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):
273
273
required = []
274
274
275
275
if kwargs ["mds" ]:
276
- try :
276
+ if "sp_entity_id" in kwargs :
277
277
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 :
283
278
for ec_map in maps :
284
279
for key , (atlist , only_required ) in ec_map .items ():
285
280
if key == "" : # always released
@@ -305,6 +300,10 @@ def post_entity_categories(maps, **kwargs):
305
300
306
301
for attr in attrs :
307
302
restrictions [attr ] = None
303
+ else :
304
+ for ec_map in maps :
305
+ for attr in ec_map ["" ]:
306
+ restrictions [attr ] = None
308
307
309
308
return restrictions
310
309
You can’t perform that action at this time.
0 commit comments