-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[master] Tighten type check in domain #18
Conversation
i tested the patch and it solve the problem. Thanks |
a |
Here you have ;) 👍 (code review) |
👍 |
👍 (code review) |
Rebased |
@@ -32,7 +32,7 @@ def search( | |||
model_domain = [] | |||
for domain in args: | |||
if domain[0] == 'model_id' and domain[2]\ |
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.
@bwrsandman I think you should also remove the and domain[2]
which is useless (and confusing) after the change below, as an empty string will not cause a problem. You may want to change it to and len(domain) == 3
which will avoid an IndexError
when confronted with a bad formed domain, and which maybe was the original intent, but I would not do this as this will most certainly crash a couple of calls further down in the stack.
-> needs fixing
@gurneyalex done |
Fixes OCA#15 Check that `domain[2]` is `str` because in some cases it's an `int` and `list` operations don't work on `int`s.
@bwrsandman OK, I'll merge this and port the merge to 7.0 too (instead of #16) |
[MIG] web_easy_switch_company
base_report_to_printer: missing security
[12.0][MIG] server environment from 11.0
Fixes #15
Check that
domain[2]
isstr
because in some cases it's anint
andlist
operations don't work on
int
s.