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

Error when editing action #237

Open
AmberSJones opened this issue Jan 10, 2018 · 12 comments
Open

Error when editing action #237

AmberSJones opened this issue Jan 10, 2018 · 12 comments
Assignees
Milestone

Comments

@AmberSJones
Copy link

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.

image

@Elijahwalkerwest
Copy link

Fixed alongside #238

Need to merge and deploy.

@Elijahwalkerwest
Copy link

Deployed and ready for testing.

@AmberSJones
Copy link
Author

AmberSJones commented Feb 27, 2018

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/
image

@Elijahwalkerwest
Copy link

Should be fixed on sandbox now!

@AmberSJones
Copy link
Author

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/
image

http://django.uwrl.usu.edu/equipment/actions/create-action/InstrumentCalibration/1047/
image

@Elijahwalkerwest
Copy link

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.

@Elijahwalkerwest
Copy link

However this is now a different issue, we should create a new issue and close this one.

@Elijahwalkerwest
Copy link

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.

@Elijahwalkerwest
Copy link

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.

@Elijahwalkerwest
Copy link

Looking at the fix_data script it looks like this corner case was missed. Updating it now.

@AmberSJones
Copy link
Author

What is the status of this issue? Is there anything still outstanding?

@Elijahwalkerwest
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants