Open AmberSJones opened 6 years ago
Fixed alongside #238
Need to merge and deploy.
Deployed and ready for testing.
Still getting an error when I attempt to do this. In this case, the error came when adding the calibration action. When I later view the Site Visit details page, the calibration has been added. This could be related to calibration standards because the calibration standards that I entered did not show up as reference material. http://django.uwrl.usu.edu/equipment/actions/edit-site-visit/1042/
Should be fixed on sandbox now!
Ok, this appears to be functional now, but I think we have some artifacts where existing actions were left with some sort of issue. See below for trying to edit this site visit and the corresponding calibration. But I created a new calibration on this site visit and it worked great. http://django.uwrl.usu.edu/equipment/actions/edit-site-visit/1042/
http://django.uwrl.usu.edu/equipment/actions/create-action/InstrumentCalibration/1047/
Looking in to this and there is a lot of strange behavior. I can't find anything creating these anymore, but it looks like actions being deleted without their related actions being deleted. So the Site Visit tried to check its related actions and fails. I'll work on a script for this.
However this is now a different issue, we should create a new issue and close this one.
Sc-sc-scratch that.
It looks like some calibrations were created as Action objects, but not CalibrationActions
So when it tries to explicitly query the related action via the CalibrationAction table, it can't find it.
Yeah, I added some stuff to action deletion to make sure it doesn't happen again. It looks like this data is bad, i.e. you were trying to edit an action with an ID of 1047, that while there was a valid Action object, there was no CalibrationAction.
This is something Juan's script fixed, or should have fixed. EIther it didn't fix it in the first place, or there is something breaking it. Looking in to it now.
Looking at the fix_data script it looks like this corner case was missed. Updating it now.
What is the status of this issue? Is there anything still outstanding?
Let's keep it open. The behavior that caused the broken data is no longer present, but some of the bad data still exists and will do so until we run the script with my updates and clean it up. So either we can close this and make a new issue to that effect, or leave this one open.
I add a calibration action to an existing site visit. Seems fine. I then click “Edit Calibration Description”. I make an edit and click save. I get this error. When I access the site visit, the edit does actually proceed, however.