Don't show quantity for single items

main
Bob Mottram 2021-07-27 21:31:14 +01:00
parent 51ff7f8126
commit 65ee4a6cee
2 changed files with 8 additions and 6 deletions

View File

@ -137,6 +137,7 @@ def _htmlSearchResultShare(sharedItem: {}, translate: {},
'" alt="Item image"></a>\n'
sharedItemsForm += '<p>' + sharedItem['summary'] + '</p>\n<p>'
if sharedItem.get('itemQty'):
if sharedItem['itemQty'] > 1:
sharedItemsForm += \
'<b>' + translate['Quantity'] + \
':</b> ' + str(sharedItem['itemQty']) + '<br>'

View File

@ -826,6 +826,7 @@ def htmlIndividualShare(actor: str, item: {}, translate: {},
'" alt="' + translate['Item image'] + '">\n</a>\n'
profileStr += '<p>' + item['summary'] + '</p>\n<p>'
if item.get('itemQty'):
if item['itemQty'] > 1:
profileStr += \
'<b>' + translate['Quantity'] + ':</b> ' + \
str(item['itemQty']) + '<br>'