This commit is contained in:
Sanj 2012-01-18 16:50:48 +05:30
parent 4039310dbf
commit 60070fc9b0

View File

@ -57,7 +57,7 @@ class EmailerArticle(models.Model):
def getImageHTML(self, short_name):
img = ArticleImage.objects.filter(article=self).filter(short_name=short_name)
if len(img) > 0:
return img.getHTML()
return img[0].getHTML()
else:
return ''