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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Adding OrganizationUser and assigning default RadiusGroup together raises server error #507

Open
pandafy opened this issue Jan 24, 2024 · 2 comments · May be fixed by #514
Open

[bug] Adding OrganizationUser and assigning default RadiusGroup together raises server error #507

pandafy opened this issue Jan 24, 2024 · 2 comments · May be fixed by #514
Labels
bug Something isn't working good-first-issue Good for newcomers help wanted Extra attention is needed

Comments

@pandafy
Copy link
Member

pandafy commented Jan 24, 2024

Steps to replicate

  1. Create a new user at /admin/openwisp_users/user/add/ (do not add this user to any organization)
  2. Edit this user: add organization user with "default" org and add "default-users" Radius user group to this user
  3. Save the user

Expected user

The save operation is performed without any error. The OrganizationUser and RadiusUserGroup objects get created.

Actual outcome

The application raises server 500 error.

Possible solution

  1. Add a failing test case in https://github.com/openwisp/openwisp-radius/blob/master/openwisp_radius/tests/test_users_integration.py which emulates the above scenario
  2. Fix the signal receiver to log this error as warning and return silently

https://github.com/openwisp/openwisp-radius/blob/3deb0ef8a1e933372e10c1183794b9d9d8fe057b/openwisp_radius/receivers.py#L33C1-L48C22

@pandafy pandafy added help wanted Extra attention is needed good-first-issue Good for newcomers labels Jan 24, 2024
@pandafy pandafy added this to To do (general) in OpenWISP Contributor's Board via automation Jan 24, 2024
@pandafy pandafy moved this from To do (general) to To do (Python & Django) in OpenWISP Contributor's Board Jan 24, 2024
@pandafy pandafy added the bug Something isn't working label Jan 24, 2024
@d1vyanshu-kumar
Copy link

d1vyanshu-kumar commented Jan 27, 2024

Could you kindly assign this issue to me?

@samirgorai
Copy link

#509

Shiva953 added a commit to Shiva953/openwisp-radius that referenced this issue Feb 19, 2024
Added a try-except block to ensure that it doesn't raise a 500 error and
logs the apt error as warning whenever user tries adding OrganizationUser and assigning default RadiusGroup together.

Fixes openwisp#507
Shiva953 added a commit to Shiva953/openwisp-radius that referenced this issue Feb 22, 2024
An empty commit to follow the commit conventions not followed in earlier
commits, such that the QA checks pass. No new changes intended.

Related to openwisp#507
Shiva953 added a commit to Shiva953/openwisp-radius that referenced this issue Feb 22, 2024
Provides an apt error message description in case an exception arises.

Fixes openwisp#507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue Good for newcomers help wanted Extra attention is needed
Projects
OpenWISP Contributor's Board
  
To do (Python & Django)
3 participants