OCA / pylint-odoo

Odoo plugin for Pylint
http://www.pylint.org
143 stars 168 forks source link

[FIX] sql-injection: AttributeError: 'NoneType' object has no attribute 'parent' #350

Closed moylop260 closed 3 years ago

moylop260 commented 3 years ago

Using the following code:

queries = [
    "SELECT id FROM res_partner",
    "SELECT id FROM res_users",
]
for query in queries:
    self.env.cr.execute(query)

The check sql-injection shows the following error:

So, Now it is validating if it is not None