Mercurial > libervia-backend
changeset 3191:7255286a298a
memory (sqlite): don't store empty messages
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Feb 2020 22:03:15 +0100 |
parents | 1c6dacbfcf27 |
children | 883fb4981958 |
files | sat/memory/sqlite.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/memory/sqlite.py Wed Feb 26 22:03:15 2020 +0100 +++ b/sat/memory/sqlite.py Wed Feb 26 22:03:15 2020 +0100 @@ -442,6 +442,9 @@ d_list = [] for key in ('message', 'subject'): for lang, value in data[key].items(): + if not value.strip(): + # no need to store empty messages + continue d = self.dbpool.runQuery( "INSERT INTO {key}(history_uid, {key}, language) VALUES (?,?,?)" .format(key=key),