diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-02-07 14:59:21 +0100 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-02-07 14:59:21 +0100 |
commit | 06ca4cb6c61ea389127c214aa7b8a1f55eb0c42f (patch) | |
tree | 5fd4e8aa4d2df45df93dede8847dad18c211717f | |
parent | 6c92e71a7ba6126173ab7f92dd754828ce8889c3 (diff) | |
download | kittystore-06ca4cb6c61ea389127c214aa7b8a1f55eb0c42f.tar.gz kittystore-06ca4cb6c61ea389127c214aa7b8a1f55eb0c42f.tar.xz kittystore-06ca4cb6c61ea389127c214aa7b8a1f55eb0c42f.zip |
Add a method to get the email hashes in a thread
-rw-r--r-- | kittystore/storm/model.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kittystore/storm/model.py b/kittystore/storm/model.py index c4b66d0..75ec41e 100644 --- a/kittystore/storm/model.py +++ b/kittystore/storm/model.py @@ -209,6 +209,10 @@ class Thread(Storm): def email_ids(self): return list(self.emails.find().order_by().values(Email.message_id)) + @property + def email_id_hashes(self): + return list(self.emails.find().order_by().values(Email.message_id_hash)) + def __len__(self): return self.emails.count() |