mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Dumb, dumb bug causing division by zero errors because the autocomplete boost was 0.
This commit is contained in:
parent
3eaad16adf
commit
13616665c1
1 changed files with 2 additions and 2 deletions
|
@ -236,12 +236,12 @@ class Feed(models.Model):
|
|||
|
||||
engine = RedisEngine(prefix="FT", connection_pool=settings.REDIS_AUTOCOMPLETE_POOL)
|
||||
engine.store(self.pk, title=self.feed_title)
|
||||
engine.boost(self.pk, min(1, self.num_subscribers / 10000.))
|
||||
engine.boost(self.pk, max(1, self.num_subscribers / 10000.))
|
||||
|
||||
parts = urlparse(self.feed_address)
|
||||
engine = RedisEngine(prefix="FA", connection_pool=settings.REDIS_AUTOCOMPLETE_POOL)
|
||||
engine.store(self.pk, title=parts.hostname)
|
||||
engine.boost(self.pk, min(1, self.num_subscribers / 10000.))
|
||||
engine.boost(self.pk, max(1, self.num_subscribers / 10000.))
|
||||
|
||||
@classmethod
|
||||
def autocomplete(self, prefix, limit=5):
|
||||
|
|
Loading…
Add table
Reference in a new issue