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

member requests: "User already exists" should include link to existing user #709

Open
lukasjuhrich opened this issue Apr 4, 2024 · 1 comment
Labels
enhancement 🔨 web/ui Things relating to Flask routes and Jinja templates

Comments

@lukasjuhrich
Copy link
Collaborator

When finalizing a member request, sometimes the request errors with a flash message "user already exists". However, without a link to the conflicting user claimed to exist, that is harder to troubleshoot than necessary.

The reason for conflict should be displayed and conflicting user should be displayed with a link.

@lukasjuhrich lukasjuhrich added enhancement 🔨 web/ui Things relating to Flask routes and Jinja templates labels Apr 4, 2024
@lukasjuhrich
Copy link
Collaborator Author

This should work by attaching custom data (namely the debitorennummer in question) to the UserExistsException:

pycroft/pycroft/lib/user.py

Lines 1212 to 1213 in f25dc1f

if user_swdd_person_id and not allow_existing:
raise UserExistsException

…and then catching it to report it in detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔨 web/ui Things relating to Flask routes and Jinja templates
Projects
Status: To do
Development

No branches or pull requests

1 participant