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

Control sensitive fields better #491

Conversation

LightOfHeaven1994
Copy link
Collaborator

@LightOfHeaven1994 LightOfHeaven1994 commented Apr 5, 2024

This is going to help us avoid backend failures with 500 as we didn't check what user put into some fields and python had issues with it. Example, when user put into group field incorrect value "component=foo", as the result backend fails as Run object doesn't have this attribute:

  File "/app/ibutsu_server/filters.py", line 84, in string_to_column
    column = getattr(model, field)
AttributeError: type object 'Run' has no attribute 'component=foo'

If there are some issues to find a column - we return None from string_to_column helper function. Then widgets that have this field mandatory will return empty data

@LightOfHeaven1994 LightOfHeaven1994 marked this pull request as ready for review April 5, 2024 14:55
@LightOfHeaven1994 LightOfHeaven1994 force-pushed the control-sensitive-fields-better branch from c55a8aa to 2da06d2 Compare April 8, 2024 10:44
@LightOfHeaven1994 LightOfHeaven1994 merged commit bd9940b into ibutsu:master Apr 8, 2024
9 checks passed
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.

1 participant