diff options
-rw-r--r-- | archaeological_finds/forms_treatments.py | 2 | ||||
-rw-r--r-- | archaeological_finds/models_finds.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 0f25363ee..2c10028d4 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -313,7 +313,7 @@ class BaseTreatmentForm(CustomForm, ManageOldType): try: treatment_types = [ models.TreatmentType.objects.get( - pk=pk, available=True, + pk=pk, upstream_is_many=self.UPSTREAM_IS_MANY, downstream_is_many=self.DOWNSTREAM_IS_MANY) for pk in data.get('treatment_type', [])] diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 08cf4f4d2..f140c2d61 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -216,6 +216,7 @@ class TreatmentType(HierarchicalType): rank = types[-1].rank else: type_list = [idx for idx, __ in types] + dct["available"] = True q = cls.objects.filter(**dct).exclude(pk__in=type_list) for t in q.all(): if instances: |