From fb39dcd82518a0d6292aafc47b09a8b273d4ec04 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Sat, 30 Mar 2013 13:31:31 +0100 Subject: [PATCH] [qcookboob] no shortdesc case --- weboob/applications/qcookboob/minirecipe.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/weboob/applications/qcookboob/minirecipe.py b/weboob/applications/qcookboob/minirecipe.py index 5c0868c6..5d343b05 100644 --- a/weboob/applications/qcookboob/minirecipe.py +++ b/weboob/applications/qcookboob/minirecipe.py @@ -37,10 +37,13 @@ class MiniRecipe(QFrame): self.backend = backend self.recipe = recipe self.ui.titleLabel.setText(recipe.title) - if len(recipe.short_description) > 300: - self.ui.shortDescLabel.setText('%s [...]'%recipe.short_description[:300]) + if not empty(recipe.short_description): + if len(recipe.short_description) > 300: + self.ui.shortDescLabel.setText('%s [...]'%recipe.short_description[:300]) + else: + self.ui.shortDescLabel.setText(recipe.short_description) else: - self.ui.shortDescLabel.setText(recipe.short_description) + self.ui.shortDescLabel.setText('') self.ui.backendLabel.setText(backend.name) self.gotThumbnail()