-
Notifications
You must be signed in to change notification settings - Fork 1
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
Edf fields #215
Edf fields #215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When uploading binary files or settings files to existing Experiment Data file object, an error message was thrown saying the uploaded file was invalid. However, going back to the experiment's page showed the files had actually uploaded and could be downloaded.
When uploading binary files or settings files for a new Experiment Data file object, the error was thrown again but recognised the files were invalid and did not create the new Data object.
I suspect this behaviour is again in the logic for when to save/not save objects in the |
Yeah, in general the logic for So the form is valid, which means the So either, in the view we can remove the check for the formset being valid, or we can choose to allow users to change the file they've uploaded. |
For simplicity, I've opted for option a - removing the unused formset from the UpdateView - in the latest commit, which looks like has done the trick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems good now!
Co-authored-by: Adrian D'Alessandro <[email protected]>
Just been testing and noticed that when uploading an invalid settings or binary file when editing existing experiment data, the files are still uploaded despite the error message flagging them. Isn't an issue for new experiment data as it successfully blocks the upload there. Changes have been merged already so I guess this should be put into a new issue? |
That's strange. Maybe because in the |
This adds two new optional fields to the ExperimentDataFile, one for "settings file" and one for "binary file". These are just
FileFields
as opposed toUploadedFile
objects because they never need to be parsed or have any of the other properties of data files.New validators have been created to check the files meet certain criteria. These may need to be reviewed in future as different types of file (with different allowed extensions) come to light.
closes #179