Skip to content

Commit

Permalink
Merge pull request #1723 from webkom/bugfix-invalid-case-name
Browse files Browse the repository at this point in the history
Fix bug where comparison was case sensitive
  • Loading branch information
norbye authored Aug 20, 2024
2 parents 186c483 + 7e9417b commit b762977
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/routes/ApplicationForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ const validationSchema = (
.filter(
([groupName, isSelected]) =>
isSelected &&
admission?.groups.some((group) => group.name === groupName),
admission?.groups.some(
(group) => group.name.toLowerCase() === groupName,
),
)
.forEach(
([groupName]) =>
Expand Down Expand Up @@ -163,7 +165,9 @@ const ApplicationForm: React.FC<ApplicationFormProps> = ({
.filter(
(groupName) =>
selectedGroups[groupName] &&
admission?.groups.some((group) => group.name === groupName),
admission?.groups.some(
(group) => group.name.toLowerCase() === groupName,
),
)
.forEach((name) => {
submission.applications[name] = values.groups[name];
Expand Down

0 comments on commit b762977

Please sign in to comment.