diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2010-10-17 19:30:00 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2010-10-17 19:30:00 +0200 |
| commit | ea969153db4f887a8fb9213b7e7cd11f01bb31e3 (patch) | |
| tree | fa96006caccf7ae00f974222ba1d360a18ae4ca0 /addons/fetchmail/fetchmail.py | |
| parent | 255eea5655a7d2c75bd3642903d4a804f472f59f (diff) | |
[IMP+FIX] improvements patches from xrg
bzr revid: fp@tinyerp.com-20101017173000-m208j7b6kges3zlc
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 7d527442391..2147d774762 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -71,8 +71,9 @@ class email_server(osv.osv): } def check_duplicate(self, cr, uid, ids): + # RFC *-* Why this limitation? why not in SQL constraint? vals = self.read(cr, uid, ids, ['user', 'password'])[0] - cr.execute("select count(id) from email_server where user='%s' and password='%s'" % (vals['user'], vals['password'])) + cr.execute("select count(id) from email_server where user='%s' and password='%s'", (vals['user'], vals['password'])) res = cr.fetchone() if res: if res[0] > 1: |
