diff --git a/rdmo/projects/managers.py b/rdmo/projects/managers.py index 62b6600ea..2bc6c7384 100644 --- a/rdmo/projects/managers.py +++ b/rdmo/projects/managers.py @@ -163,14 +163,14 @@ def filter_set(self, set_value): if element.attribute == set_value.attribute: attributes.update([descendant.attribute for descendant in element.descendants]) - # construct the set_prefix for decendants for this set - decendants_set_prefix = \ + # construct the set_prefix for descendants for this set + descendants_set_prefix = \ f'{set_value.set_prefix}|{set_value.set_index}' if set_value.set_prefix else str(set_value.set_index) - # collect all values for this set and all decendants + # collect all values for this set and all descendants return self.filter(attribute__in=attributes).filter( Q(set_prefix=set_value.set_prefix, set_index=set_value.set_index) | - Q(set_prefix__startswith=decendants_set_prefix) + Q(set_prefix__startswith=descendants_set_prefix) )