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.
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:
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.