c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #01254
[Bug 666857] [NEW] [6.0] fetchmail module check_duplicate code sql query is wrong
Public bug reported:
RC1
fetchmail/fetchmail.py:73
The code is
cr.execute("select count(id) from email_server where user='%s' and
password='%s'", (vals['user'], vals['password']))
Should've been
cr.execute("select count(id) from email_server where user=%s and
password=%s", (vals['user'], vals['password']))
Or even better (as the RFC comments) use the sql constraints with a
combined unique key
Like
_sql_constraints = [
('unique_account', 'UNIQUE(user,password)', 'Warning! Can\'t have duplicate server configuration!')
]
** Affects: openobject-addons
Importance: Undecided
Status: New
--
[6.0] fetchmail module check_duplicate code sql query is wrong
https://bugs.launchpad.net/bugs/666857
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Addons Modules: New
Bug description:
RC1
fetchmail/fetchmail.py:73
The code is
cr.execute("select count(id) from email_server where user='%s' and password='%s'", (vals['user'], vals['password']))
Should've been
cr.execute("select count(id) from email_server where user=%s and password=%s", (vals['user'], vals['password']))
Or even better (as the RFC comments) use the sql constraints with a combined unique key
Like
_sql_constraints = [
('unique_account', 'UNIQUE(user,password)', 'Warning! Can\'t have duplicate server configuration!')
]
Follow ups
References