Frontware / Weladee-odoo

Odoo addon for Weladee by Frontware International Co.,Ltd.
https://weladee.com
GNU Lesser General Public License v3.0
5 stars 9 forks source link

Fix 'Do not use `len(SEQUENCE)` to determine if a sequence is empty' issue in Modules\odoo11\Weladee_Attendances\models\weladee_employee.py #4

Closed efairon closed 6 years ago

efairon commented 6 years ago

CodeFactor found an issue: Do not use len(SEQUENCE) to determine if a sequence is empty

It's currently on: Modules\odoo11\Weladee_Attendances\models\weladee_employee.py:191 Commit e5a3c201c34c69306e17ffc0cbf96461dbfefb00

changlianxiya139 commented 6 years ago
if len(WeladeeData.employee.Phones) == 0:

Maybe it can be modified to

if not WeladeeData.employee.Phones:
efairon commented 6 years ago

@fwkpo

Fixed # https://github.com/Frontware/Weladee-odoo/commit/3f6aa6a4ac3594010caa16eb3f33141405a63477