Mercurial > hg > Feedworm
comparison backend/couchdb/FeedEntry.py @ 163:e284a37df1d9
re-enable finding a FeedEntry by its link
author | dirk |
---|---|
date | Mon, 29 Aug 2011 03:17:09 +0200 |
parents | a05719a6175e |
children | 91a24f499318 |
comparison
equal
deleted
inserted
replaced
162:ab2b26412b77 | 163:e284a37df1d9 |
---|---|
12 updated = DateTimeField() | 12 updated = DateTimeField() |
13 feed = TextField() | 13 feed = TextField() |
14 | 14 |
15 @staticmethod | 15 @staticmethod |
16 def findByLink(link, database): | 16 def findByLink(link, database): |
17 # result = FeedEntry.view(database, "feedtest/feedEntry_by_link", { "key" : link }) | 17 result = FeedEntry.view(database, "feedtest/feedEntry_by_link", key=link) |
18 # try: | 18 try: |
19 # row = iter(result).next() | 19 return iter(result).next() |
20 # return FeedEntry(row) | 20 except StopIteration: |
21 # except StopIteration: | 21 return None |
22 # return None | |
23 return None | |
24 | 22 |
25 def markRead(self, database): | 23 def markRead(self, database): |
26 self.read = True | 24 self.read = True |
27 self.store(database) | 25 self.store(database) |
28 | 26 |