Bugfix for request with empty body

bzr revid: fp@tinyerp.com-cb655ae546750aeb0fdd9eed26ce89da1029335a
This commit is contained in:
Fabien Pinckaers 2008-05-21 12:38:00 +00:00
parent 72f84ecf35
commit 1cf67e365a
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class res_request(osv.osv):
cr.execute('update res_request set state=%s,date_sent=%s where id=%d', ('waiting', time.strftime('%Y-%m-%d %H:%M:%S'), id))
cr.execute('select act_from,act_to,body,date_sent from res_request where id=%d', (id,))
values = cr.dictfetchone()
if len(values['body']) > 128:
if values['body'] and (len(values['body']) > 128):
values['name'] = values['body'][:125] + '...'
else:
values['name'] = values['body'] or '/'