Open MrSerth opened 1 month ago
When importing a ProFormA task that contains a test but without a test file or alternatively a model solution without a model solution file, CodeOcean throws an error.
Most likely, the error is caused through these two lines:
https://github.com/openHPI/codeocean/blob/1e08f2cc9cda8f5f0d49b8543cf25323e0b93e2f/app/services/proforma_service/convert_task_to_exercise.rb#L68
https://github.com/openHPI/codeocean/blob/1e08f2cc9cda8f5f0d49b8543cf25323e0b93e2f/app/services/proforma_service/convert_task_to_exercise.rb#L79
Here, we are accessing the ID of the first file for both, but don't handle the case where no file exists.
When importing a ProFormA task that contains a test but without a test file or alternatively a model solution without a model solution file, CodeOcean throws an error.
Most likely, the error is caused through these two lines:
https://github.com/openHPI/codeocean/blob/1e08f2cc9cda8f5f0d49b8543cf25323e0b93e2f/app/services/proforma_service/convert_task_to_exercise.rb#L68
https://github.com/openHPI/codeocean/blob/1e08f2cc9cda8f5f0d49b8543cf25323e0b93e2f/app/services/proforma_service/convert_task_to_exercise.rb#L79
Here, we are accessing the ID of the first file for both, but don't handle the case where no file exists.