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

Show 'n/a' in case of missing information to avoid crashing. #54

Merged
merged 1 commit into from
Mar 14, 2018
Merged

Show 'n/a' in case of missing information to avoid crashing. #54

merged 1 commit into from
Mar 14, 2018

Conversation

jle64
Copy link
Contributor

@jle64 jle64 commented Mar 14, 2018

What this PR does / why we need it:

This PR shows 'n/a' in the appropriate field in cases of missing user or host when doing a session ls or userkey ls, thus avoiding a crash if listing sessions or userkeys after removing the host or user they reference.

Which issue this PR fixes: fixes #53 (userkey ls crashes) and also some session ls crashes.

Special notes for your reviewer:

Not sure this is the right way to fix this. Maybe userkeys should juste be removed alongside the associated user as there doesn't seem to be a point to keeping them around ? Also maybe database constraints should be added to avoid breaking relations ? Don't hesitate to tell me and I will look into modifying the PR accordingly.

Copy link
Owner

@moul moul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (I will do go linting etc in another commit)

Thanks :)

@moul moul merged commit 09ac2c3 into moul:master Mar 14, 2018
@jle64
Copy link
Contributor Author

jle64 commented Mar 14, 2018

Thank you ! And sorry for the linting and only saw it after doing the PR and you were too reactive for me to have the time to fix it :)

@moul
Copy link
Owner

moul commented Mar 14, 2018

:)

@adyxax adyxax mentioned this pull request Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash when using userkey ls
2 participants