Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import task: Handle exercises without tests / model solution files #2503

Open
MrSerth opened this issue Sep 3, 2024 · 0 comments
Open

Import task: Handle exercises without tests / model solution files #2503

MrSerth opened this issue Sep 3, 2024 · 0 comments
Labels
bug ruby Pull requests that update Ruby code

Comments

@MrSerth
Copy link
Member

MrSerth commented Sep 3, 2024

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:

task_files.delete(test_object.files.first.id).tap do |file|

task_files.delete(model_solution_object.files.first.id).tap do |file|

Here, we are accessing the ID of the first file for both, but don't handle the case where no file exists.

@MrSerth MrSerth added bug ruby Pull requests that update Ruby code labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ruby Pull requests that update Ruby code
Projects
None yet
Development

No branches or pull requests

1 participant