mirror of https://gitlab.com/bashrc2/epicyon
Include price in catalog
parent
312e8bbdfa
commit
5cd8854a48
10
shares.py
10
shares.py
|
@ -764,16 +764,15 @@ def sharesCatalogAccountEndpoint(baseDir: str, httpPrefix: str,
|
||||||
|
|
||||||
shareId = getValidSharedItemID(owner, item['displayName'])
|
shareId = getValidSharedItemID(owner, item['displayName'])
|
||||||
dfcId = item['dfcId'].split('#')[1]
|
dfcId = item['dfcId'].split('#')[1]
|
||||||
|
priceStr = item['itemPrice'] + ' ' + item['currency']
|
||||||
catalogItem = {
|
catalogItem = {
|
||||||
"@id": shareId,
|
"@id": shareId,
|
||||||
"@type": "DFC:SuppliedProduct",
|
"@type": "DFC:SuppliedProduct",
|
||||||
"DFC:hasType": "dfc-pt:" + dfcId,
|
"DFC:hasType": "dfc-pt:" + dfcId,
|
||||||
"DFC:offeredThrough": owner,
|
|
||||||
"DFC:startDate": item['published'],
|
"DFC:startDate": item['published'],
|
||||||
"DFC:expiryDate": expireDateStr,
|
"DFC:expiryDate": expireDateStr,
|
||||||
"DFC:quantity": item['itemQty'],
|
"DFC:quantity": item['itemQty'],
|
||||||
"DFC:totalTheoriticalStock": item['itemQty'],
|
"DFC:price": priceStr,
|
||||||
"DFC:price": "0",
|
|
||||||
"DFC:Image": item['imageUrl'],
|
"DFC:Image": item['imageUrl'],
|
||||||
"DFC:description": item['displayName'] + ': ' + item['summary']
|
"DFC:description": item['displayName'] + ': ' + item['summary']
|
||||||
}
|
}
|
||||||
|
@ -833,16 +832,15 @@ def sharesCatalogEndpoint(baseDir: str, httpPrefix: str,
|
||||||
description = item['displayName'] + ': ' + item['summary']
|
description = item['displayName'] + ': ' + item['summary']
|
||||||
shareId = getValidSharedItemID(owner, item['displayName'])
|
shareId = getValidSharedItemID(owner, item['displayName'])
|
||||||
dfcId = item['dfcId'].split('#')[1]
|
dfcId = item['dfcId'].split('#')[1]
|
||||||
|
priceStr = item['itemPrice'] + ' ' + item['currency']
|
||||||
catalogItem = {
|
catalogItem = {
|
||||||
"@id": shareId,
|
"@id": shareId,
|
||||||
"@type": "DFC:SuppliedProduct",
|
"@type": "DFC:SuppliedProduct",
|
||||||
"DFC:hasType": "dfc-pt:" + dfcId,
|
"DFC:hasType": "dfc-pt:" + dfcId,
|
||||||
"DFC:offeredThrough": owner,
|
|
||||||
"DFC:startDate": item['published'],
|
"DFC:startDate": item['published'],
|
||||||
"DFC:expiryDate": expireDateStr,
|
"DFC:expiryDate": expireDateStr,
|
||||||
"DFC:quantity": item['itemQty'],
|
"DFC:quantity": item['itemQty'],
|
||||||
"DFC:totalTheoriticalStock": item['itemQty'],
|
"DFC:price": priceStr,
|
||||||
"DFC:price": "0",
|
|
||||||
"DFC:Image": item['imageUrl'],
|
"DFC:Image": item['imageUrl'],
|
||||||
"DFC:description": description
|
"DFC:description": description
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue