mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Handling null titles.
This commit is contained in:
parent
7f1638e679
commit
c24a7ffc5f
1 changed files with 4 additions and 1 deletions
|
@ -58,6 +58,9 @@ class Feed(models.Model):
|
|||
|
||||
|
||||
def __unicode__(self):
|
||||
if not self.feed_title:
|
||||
self.feed_title = "[Untitled]"
|
||||
self.save()
|
||||
return self.feed_title
|
||||
|
||||
def save(self, lock=None, *args, **kwargs):
|
||||
|
@ -590,7 +593,7 @@ class Feed(models.Model):
|
|||
elif self.last_load_time >= 200:
|
||||
slow_punishment = 12 * self.last_load_time
|
||||
total = int(updates_per_day_delay + subscriber_bonus + slow_punishment)
|
||||
print "[%s] %s (%s-%s), %s, %s: %s" % (self, updates_per_day_delay, updates_per_day, self.num_subscribers, subscriber_bonus, slow_punishment, total)
|
||||
# print "[%s] %s (%s-%s), %s, %s: %s" % (self, updates_per_day_delay, updates_per_day, self.num_subscribers, subscriber_bonus, slow_punishment, total)
|
||||
random_factor = random.randint(0, total) / 4
|
||||
|
||||
return total, random_factor
|
||||
|
|
Loading…
Add table
Reference in a new issue