Skip to content

Commit

Permalink
Fix missing filestore arg in complex model file prep
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed May 16, 2024
1 parent 626469d commit 35b552c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/model_execution_worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def generate_input(self,
os.path.join(oasis_files_dir, 'analysis_settings.json')
)
if complex_data_files:
prepare_complex_model_file_inputs(complex_data_files, input_data_dir)
prepare_complex_model_file_inputs(complex_data_files, input_data_dir, filestore)
task_params['user_data_dir'] = input_data_dir

config_path = get_oasislmf_config_path(settings)
Expand Down
6 changes: 5 additions & 1 deletion src/server/oasisapi/analysis_models/v2_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ def validate(self, attrs):

# Check that `worker_count_min` < `worker_count_max`
m_id = self.context['request'].parser_context['kwargs']['pk']
current_val = ModelScalingOptions.objects.get(id=m_id)
try:
current_val = ModelScalingOptions.objects.get(id=m_id)
except ModelScalingOptions.DoesNotExist:
# create a default config object for validation
current_val = ModelScalingOptions()

wrk_min = self.initial_data.get('worker_count_min', current_val.worker_count_min)
wrk_max = self.initial_data.get('worker_count_max', current_val.worker_count_max)
Expand Down

0 comments on commit 35b552c

Please sign in to comment.