File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed
Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,8 @@ def append_overrides(overrides):
332332 if not model .has_entity_with_id (p ):
333333 parameter_ids [p ] = None
334334
335- # remove parameters that occur in the condition table and are overridden
336- # for ALL conditions
337- for p in condition_df .columns [~ condition_df .isnull ().any ()]:
335+ # parameters that are overridden via the condition table are not allowed
336+ for p in condition_df .columns :
338337 try :
339338 del parameter_ids [p ]
340339 except KeyError :
Original file line number Diff line number Diff line change @@ -770,19 +770,12 @@ def append_overrides(overrides):
770770 if not problem .model .has_entity_with_id (str (p ))
771771 )
772772
773- # remove parameters that occur in the condition table and are overridden
774- # for ALL conditions
775- if problem .condition_df is not None :
776- ...
777- # FIXME: update to v2 -- we need to check for each value type
778- # separately?!
779- # for p in problem.condition_df.columns[
780- # ~problem.condition_df.isnull().any()
781- # ]:
782- # try:
783- # parameter_ids.remove(p)
784- # except KeyError:
785- # pass
773+ # parameters that are overridden via the condition table are not allowed
774+ for p in problem .condition_df [TARGET_ID ].unique ():
775+ try :
776+ parameter_ids .remove (p )
777+ except KeyError :
778+ pass
786779
787780 return parameter_ids
788781
You can’t perform that action at this time.
0 commit comments