Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Dec 5, 2024
1 parent 9712b74 commit 1e268c1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const getMessage = (error) => {
return error.errors.api
}
} else {
return gettext('An unknown error occured, please contact support')
return gettext('An unknown error occurred, please contact support')
}
}

Expand Down
2 changes: 1 addition & 1 deletion rdmo/projects/assets/js/interview/utils/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const getValueOption = (options, value) => {
} else if (!isEmpty(value.external_id)) {
// this is a value with an external id from a provider
if (isEmpty(options)) {
// if an external id is set but no options are retrived yet, we fake an option with
// if an external id is set but no options are retrieved yet, we fake an option with
// the stored value, so that it is displayed before the input is opened
return {
id: value.external_id,
Expand Down
8 changes: 4 additions & 4 deletions rdmo/projects/assets/js/interview/utils/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const initQuestionSet = (questionset) => {
}
})

// aggregate questionsets from decendants
// aggregate questionsets from descendants
questionset.questionsets = questionset.elements.reduce((questionsets, element) => {
if (element.model == 'questions.questionset') {
return questionsets.concat(element.questionsets)
Expand All @@ -26,7 +26,7 @@ const initQuestionSet = (questionset) => {
}
}, [])

// aggregate optionsets from decendants
// aggregate optionsets from descendants
questionset.questions = questionset.elements.reduce((questions, element) => {
if (element.model == 'questions.questionset') {
return questions.concat(element.questions)
Expand All @@ -35,7 +35,7 @@ const initQuestionSet = (questionset) => {
}
}, [])

// aggregate optionsets from decendants
// aggregate optionsets from descendants
questionset.optionsets = questionset.elements.reduce((optionsets, element) => {
if (element.model == 'questions.questionset') {
return optionsets.concat(element.optionsets)
Expand All @@ -44,7 +44,7 @@ const initQuestionSet = (questionset) => {
}
}, [])

// aggregate attributes from decendants
// aggregate attributes from descendants
questionset.attributes = questionset.elements.reduce((attributes, element) => {
if (element.model == 'questions.questionset') {
return attributes.concat(element.attributes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ <h2>
</h2>

<p>
{% trans 'An error occurred while retrieving the questionaire. Please contact support if this problem persists.' %}
{% trans 'An error occurred while retrieving the questionnaire. Please contact support if this problem persists.' %}
</p>
8 changes: 4 additions & 4 deletions rdmo/projects/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,14 @@ def set(self, request, parent_lookup_project, pk=None):
if element.attribute == value.attribute:
attributes.update([descendant.attribute for descendant in element.descendants])

# construct the set_prefix for decendants for this set
decendants_set_prefix = f'{value.set_prefix}|{value.set_index}' if value.set_prefix else str(value.set_index)
# construct the set_prefix for descendants for this set
descendants_set_prefix = f'{value.set_prefix}|{value.set_index}' if value.set_prefix else str(value.set_index)

# delete all values for this set and all decendants
# delete all values for this set and all descendants
values = self.get_queryset().filter(attribute__in=attributes) \
.filter(
Q(set_prefix=value.set_prefix, set_index=value.set_index) |
Q(set_prefix__startswith=decendants_set_prefix)
Q(set_prefix__startswith=descendants_set_prefix)
)
values.delete()

Expand Down

0 comments on commit 1e268c1

Please sign in to comment.