File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,10 @@ async def create_score_set(
334334 msg = "Failed to create score set; The requested experiment does not exist." , extra = logging_context ()
335335 )
336336 raise HTTPException (status_code = status .HTTP_400_BAD_REQUEST , detail = "Unknown experiment" )
337+ # Not allow add score set in meta-analysis experiments.
338+ if any (s .meta_analyzes_score_sets for s in experiment .score_sets ):
339+ raise HTTPException (status_code = status .HTTP_403_FORBIDDEN ,
340+ detail = "Score sets may not be added to a meta-analysis experiment." )
337341
338342 save_to_logging_context ({"experiment" : experiment .urn })
339343 assert_permission (user_data , experiment , Action .ADD_SCORE_SET )
@@ -386,7 +390,7 @@ async def create_score_set(
386390 )
387391
388392 if len (meta_analyzes_score_sets ) > 0 :
389- # If any existing score set is a meta-analysis for score sets in the same collection of exepriment sets, use its
393+ # If any existing score set is a meta-analysis for score sets in the same collection of experiment sets, use its
390394 # experiment as the parent of our new meta-analysis. Otherwise, create a new experiment.
391395 meta_analyzes_experiment_sets = list (
392396 set (
You can’t perform that action at this time.
0 commit comments