-
Notifications
You must be signed in to change notification settings - Fork 45
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
Update all deps. #228
Update all deps. #228
Conversation
No-Issue Signed-off-by: James Tanner <[email protected]>
Looks relevant because it landed in DRF |
No-Issue Signed-off-by: James Tanner <[email protected]>
No-Issue Signed-off-by: James Tanner <[email protected]>
No-Issue Signed-off-by: James Tanner <[email protected]>
Quality Gate passedIssues Measures |
No-Issue Signed-off-by: James Tanner <[email protected]>
This reverts commit f8c13fa.
This reverts commit e2ce3c5.
This reverts commit 2d82db0.
raise ValidationError(_('Invalid filter: %s') % value) | ||
raise ValidationError(_('Invalid filter: %s' % value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel correct to me. If I understand right, this will do the string interpolation before _()
meaning that the fully interpolated string is what will land in the translation files.
I think the correct way to deal with the In [1]: 'foo %(bar)s' % {'bar': "aa"}
Out[1]: 'foo aa'
In [2]: 'foo %%(bar)s' % {'bar': "aa"}
Out[2]: 'foo %(bar)s' |
^ The problem is that this is test input mocking user input. The solution is that you don't ever format a string from a user. Before this DRF upgrade they didn't format the string passed into ValidationError, thus the problem. Due to the DRF change, DAB code can't safely pass in a string with user data like it is doing now. |
replaced by #230