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!')
]



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to