mirror of https://gitlab.com/bashrc2/epicyon
Share image url
parent
fa0de12f2f
commit
c94b08cecb
|
@ -1365,6 +1365,7 @@ def sharesCatalogCSVEndpoint(baseDir: str, httpPrefix: str,
|
|||
csvStr += str(item['DFC:quantity']) + ','
|
||||
csvStr += item['DFC:price'].split(' ')[0] + ','
|
||||
csvStr += '"' + item['DFC:price'].split(' ')[1] + '",'
|
||||
if item.get('DFC:Image'):
|
||||
csvStr += '"' + item['DFC:Image'] + '",'
|
||||
description = item['DFC:description'].replace('"', "'")
|
||||
csvStr += '"' + description + '",\n'
|
||||
|
@ -1776,7 +1777,6 @@ def _dfcToSharesFormat(catalogJson: {},
|
|||
not item.get('DFC:expiryDate') or \
|
||||
not item.get('DFC:quantity') or \
|
||||
not item.get('DFC:price') or \
|
||||
not item.get('DFC:Image') or \
|
||||
not item.get('DFC:description'):
|
||||
continue
|
||||
|
||||
|
@ -1825,10 +1825,13 @@ def _dfcToSharesFormat(catalogJson: {},
|
|||
itemID = item['@id']
|
||||
description = item['DFC:description'].split(':', 1)[1].strip()
|
||||
|
||||
imageUrl = ''
|
||||
if item.get('DFC:Image'):
|
||||
imageUrl = item['DFC:Image']
|
||||
sharesJson[itemID] = {
|
||||
"displayName": item['DFC:description'].split(':')[0],
|
||||
"summary": description,
|
||||
"imageUrl": item['DFC:Image'],
|
||||
"imageUrl": imageUrl,
|
||||
"itemQty": float(item['DFC:quantity']),
|
||||
"dfcId": dfcId,
|
||||
"itemType": itemType,
|
||||
|
|
Loading…
Reference in New Issue