Skeletal element category cannot be updated to empty in sample archaeology update form
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in samples/intake.py at the skeletal_element_category update logic described in the issue, then trace how the sample archaeology update form passes an empty value. Verify the form can change an existing category to empty or null and that the sample remains cleared after the update.
Written by the indexing model from the issue text.
Description
Suppose we want to update a sample via the sample archaeology update form (https://screening.reichdna.hms.harvard.edu/samples/sample_archaeology_update). If the sample begins with a skeletal element category assigned and we want to switch it to null/empty/nothing, the form currently cannot do so. This seems to be because of these lines in samples/intake.py:
if len(row.skeletal_element_category) > 0:
sample.skeletal_element_category = SkeletalElementCategory.objects.get(category__iexact=row.skeletal_element_category)
I.e. the sample's skeletal element category is only updated if we are trying to update it to something non-null/non-empty, making it impossible to update the category to null/empty.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DReichLab/waldo
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100