Shared item location is optional

main
Bob Mottram 2021-07-28 22:17:02 +01:00
parent 8c71043938
commit accd625b0a
1 changed files with 4 additions and 1 deletions

View File

@ -707,6 +707,9 @@ def outboxShareUpload(baseDir: str, httpPrefix: str,
print('DEBUG: duration missing from Offer') print('DEBUG: duration missing from Offer')
return return
itemQty = float(messageJson['object']['itemQty']) itemQty = float(messageJson['object']['itemQty'])
location = ''
if messageJson['object'].get('location'):
location = messageJson['object']['location']
addShare(baseDir, addShare(baseDir,
httpPrefix, nickname, domain, port, httpPrefix, nickname, domain, port,
messageJson['object']['displayName'], messageJson['object']['displayName'],
@ -715,7 +718,7 @@ def outboxShareUpload(baseDir: str, httpPrefix: str,
itemQty, itemQty,
messageJson['object']['itemType'], messageJson['object']['itemType'],
messageJson['object']['itemCategory'], messageJson['object']['itemCategory'],
messageJson['object']['location'], location,
messageJson['object']['duration'], messageJson['object']['duration'],
debug, city, debug, city,
messageJson['object']['itemPrice'], messageJson['object']['itemPrice'],