diff --git a/code.json b/code.json index ccbfc4f..d440a56 100644 --- a/code.json +++ b/code.json @@ -3,7 +3,7 @@ "name": "lide", "organization": "U.S. Geological Survey", "description": "Web services for LILI (LIDE (Laboratory for Infectious Disease and the Environment) Information Management System)", - "version": "v0.114.0", + "version": "v0.114.1", "status": "Release Candidate", "permissions": { diff --git a/lideservices/models.py b/lideservices/models.py index 6d96bdb..10d5a81 100644 --- a/lideservices/models.py +++ b/lideservices/models.py @@ -58,7 +58,7 @@ def recalc_reps(level, level_id, target=None, recalc_rep_conc=True, recalc_inval for rep in reps: if recalc_rep_conc: rep.replicate_concentration = rep.calc_rep_conc() - if recalc_invalid: + if recalc_invalid and rep.invalid_override is None: rep.invalid = rep.calc_invalid() if recalc_rep_conc or recalc_invalid: rep.save() diff --git a/lideservices/serializers.py b/lideservices/serializers.py index 8049a87..aef7be4 100644 --- a/lideservices/serializers.py +++ b/lideservices/serializers.py @@ -1187,8 +1187,9 @@ def update(self, instance, validated_data): self.child.pcrreplicate_batch.target.id) # calculate the invalidity for rep in reps: - rep.invalid = rep.calc_invalid() - rep.save() + if rep.invalid_override is None: + rep.invalid = rep.calc_invalid() + rep.save() return ret @@ -1244,8 +1245,9 @@ def update(self, instance, validated_data): pcrreplicate_batch__target__exact=instance.pcrreplicate_batch.target.id) # calculate the invalidity for rep in reps: - rep.invalid = rep.calc_invalid() - rep.save() + if rep.invalid_override is None: + rep.invalid = rep.calc_invalid() + rep.save() instance.save() diff --git a/lideservices/views.py b/lideservices/views.py index 2e9c30e..1fc78f9 100644 --- a/lideservices/views.py +++ b/lideservices/views.py @@ -1069,8 +1069,9 @@ def bulk_load_negatives(self, request): # recalc the child rep validity reps = PCRReplicate.objects.filter(pcrreplicate_batch=item.data['id']) for rep in reps: - rep.invalid = rep.calc_invalid() - rep.save() + if rep.invalid_override is None: + rep.invalid = rep.calc_invalid() + rep.save() response_data.append(item.data) return JsonResponse(response_data, safe=False, status=200) else: