mirror of https://gitlab.com/bashrc2/epicyon
non-food representation
parent
206aaa8940
commit
b8d3ad28ac
|
@ -1291,8 +1291,14 @@ def _dfcToSharesFormat(catalogJson: {},
|
||||||
# has expired
|
# has expired
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if item['DFC:hasType'].startswith('epicyon:'):
|
||||||
|
itemType = item['DFC:hasType'].split(':')[1]
|
||||||
|
itemType = itemType.replace('_', ' ')
|
||||||
|
itemCategory = 'non-food'
|
||||||
|
else:
|
||||||
hasType = item['DFC:hasType'].split(':')[1]
|
hasType = item['DFC:hasType'].split(':')[1]
|
||||||
itemType = _getshareTypeFromDfcId(hasType, dfcIds)
|
itemType = _getshareTypeFromDfcId(hasType, dfcIds)
|
||||||
|
itemCategory = 'food'
|
||||||
if not itemType:
|
if not itemType:
|
||||||
continue
|
continue
|
||||||
dfcId = dfcIds[itemType]
|
dfcId = dfcIds[itemType]
|
||||||
|
@ -1305,7 +1311,7 @@ def _dfcToSharesFormat(catalogJson: {},
|
||||||
"itemQty": item['DFC:quantity'],
|
"itemQty": item['DFC:quantity'],
|
||||||
"dfcId": dfcId,
|
"dfcId": dfcId,
|
||||||
"itemType": itemType,
|
"itemType": itemType,
|
||||||
"category": "food",
|
"category": itemCategory,
|
||||||
"location": "",
|
"location": "",
|
||||||
"published": item['DFC:startDate'],
|
"published": item['DFC:startDate'],
|
||||||
"expire": durationSec,
|
"expire": durationSec,
|
||||||
|
|
Loading…
Reference in New Issue