Skip to content

Commit

Permalink
Merge pull request #790 from Lunatic-Labs/SKIL-202
Browse files Browse the repository at this point in the history
Make SuperAdmin also an admin; send null to db for lms_id is not set.
  • Loading branch information
sah0017 authored Nov 26, 2024
2 parents e03ba2c + 6a6ee36 commit 2f1f261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion BackEndFlask/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def load_SuperAdminUser():
"lms_id": 0,
"consent": None,
"owner_id": None,
"role_id": None
"role_id": None,
"is_admin": True
})

# user_id = 2
Expand Down
2 changes: 1 addition & 1 deletion FrontEndReact/src/View/Admin/Add/AddUsers/AdminAddUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class AdminAddUser extends Component {
"first_name": firstName,
"last_name": lastName,
"email": email,
"lms_id": lmsId,
"lms_id": lmsId != "" ? lmsId : null,

Check warning on line 191 in FrontEndReact/src/View/Admin/Add/AddUsers/AdminAddUser.js

View workflow job for this annotation

GitHub Actions / build

Expected '!==' and instead saw '!='
"consent": null,
"owner_id": cookies.get('user')['user_id'],
"role_id": navbar.props.isSuperAdmin ? 3 : role
Expand Down

0 comments on commit 2f1f261

Please sign in to comment.