Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad naming of MSTCNNS #3471

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lego/apps/users/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class FSGroup(Enum):
def values(cls) -> list[str]:
return [e.value for e in cls]

MTDT = "fc:fs:fs:prg:ntnu.no:MTDT"
MTKOM = "fc:fs:fs:prg:ntnu.no:MTKOM"
MIDT = "fc:fs:fs:prg:ntnu.no:MIDT"
MTDT = "fc:fs:fs:prg:ntnu.no:mtdt"
MTKOM = "fc:fs:fs:prg:ntnu.no:mtkom"
MIDT = "fc:fs:fs:prg:ntnu.no:midt"
MSTCNNS = "fc:fs:fs:prg:ntnu.no:mstcnns"


Expand Down
2 changes: 1 addition & 1 deletion lego/apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def verify_student(self, feide_groups) -> bool:
return True

for group in feide_groups:
if group["id"] in constants.FSGroup.values():
if group["id"].lower() in constants.FSGroup.values():
grade_group = AbakusGroup.objects.get(
name=constants.AbakusGradeFSMapping[constants.FSGroup(group["id"])]
)
Expand Down
6 changes: 3 additions & 3 deletions lego/apps/users/tests/test_student_confirmation_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _token(token):

data_resp = [
{
"id": "fc:fs:fs:prg:ntnu.no:MTDT",
"id": "fc:fs:fs:prg:ntnu.no:mtdt",
"type": "fc:fs:prg",
"displayName": "Computer Science",
"membership": {
Expand All @@ -60,7 +60,7 @@ def _token(token):

komtek_resp = [
{
"id": "fc:fs:fs:prg:ntnu.no:MTKOM",
"id": "fc:fs:fs:prg:ntnu.no:mtkom",
"type": "fc:fs:prg",
"displayName": "Communication Technology",
"membership": {
Expand All @@ -76,7 +76,7 @@ def _token(token):

data_master_resp = [
{
"id": "fc:fs:fs:prg:ntnu.no:MIDT",
"id": "fc:fs:fs:prg:ntnu.no:midt",
"type": "fc:fs:prg",
"displayName": "Computer Science",
}
Expand Down