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

csvimport: Merging animal duplicates is now setting location back to the default if not supplied #1516

Closed
bobintetley opened this issue Aug 5, 2024 · 0 comments
Labels
Milestone

Comments

@bobintetley
Copy link
Member

bobintetley commented Aug 5, 2024

As title, if you make a small csv file to update a particular field in existing animal records, it's going to reset your locations and units for those animals.

This is because "internallocation" and "unit" are set from the file and can be blanks. Blanks are fine. The internallocation value is set to the default if not supplied though and this is where the problem is coming in. If we allow it to be blank for a new record, you're going to get a blank location on the resulting animal record.

It needs to set the default only if it's creating a new record. I guess we could do the dup check, then do the bit of row reading for ANIMALLOCATION and ANIMALUNIT in the new animal code path only.

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

No branches or pull requests

1 participant