Skip to content

Commit

Permalink
style(projects): autofix typos
Browse files Browse the repository at this point in the history
Signed-off-by: David Wallace <[email protected]>
  • Loading branch information
MyPyDavid authored and jochenklar committed Jan 10, 2025
1 parent 8b316e4 commit b453485
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions rdmo/projects/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,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)
)


Expand Down
4 changes: 2 additions & 2 deletions rdmo/projects/viewsets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import OuterRef, Prefetch, Q, Subquery
from django.db.models import OuterRef, Prefetch, Subquery
from django.db.models.functions import Coalesce, Greatest
from django.http import Http404, HttpResponseRedirect
from django.utils.translation import gettext_lazy as _
Expand Down Expand Up @@ -512,7 +512,7 @@ def copy_set(self, request, parent_lookup_project, pk=None):
# for this value and the same set_prefix and set_index
currentValue = self.get_object()

# collect all values for this set and all decendants
# collect all values for this set and all descendants
currentValues = self.get_queryset().filter_set(currentValue)

# de-serialize the posted new set value and save it, use the ValueSerializer
Expand Down

0 comments on commit b453485

Please sign in to comment.