Debug messages

main
Bob Mottram 2021-07-27 19:22:34 +01:00
parent dd9f433edb
commit f91d93ba05
1 changed files with 9 additions and 0 deletions

View File

@ -13790,21 +13790,29 @@ class PubServer(BaseHTTPRequestHandler):
return -1 return -1
elif postType == 'newshare': elif postType == 'newshare':
if not fields.get('itemQty'): if not fields.get('itemQty'):
print(postType + ' no itemQty')
return -1 return -1
if not fields.get('itemType'): if not fields.get('itemType'):
print(postType + ' no itemType')
return -1 return -1
if not fields.get('itemPrice'): if not fields.get('itemPrice'):
print(postType + ' no itemPrice')
return -1 return -1
if not fields.get('itemCurrency'): if not fields.get('itemCurrency'):
print(postType + ' no itemCurrency')
return -1 return -1
if not fields.get('category'): if not fields.get('category'):
print(postType + ' no category')
return -1 return -1
if not fields.get('location'): if not fields.get('location'):
print(postType + ' no location')
return -1 return -1
if not fields.get('duration'): if not fields.get('duration'):
print(postType + ' no duratio')
return -1 return -1
if attachmentMediaType: if attachmentMediaType:
if attachmentMediaType != 'image': if attachmentMediaType != 'image':
print('Attached media is not an image')
return -1 return -1
durationStr = fields['duration'] durationStr = fields['duration']
if durationStr: if durationStr:
@ -13825,6 +13833,7 @@ class PubServer(BaseHTTPRequestHandler):
itemCurrency = "EUR" itemCurrency = "EUR"
if fields['itemCurrency']: if fields['itemCurrency']:
itemCurrency = fields['itemCurrency'] itemCurrency = fields['itemCurrency']
print('Adding shared item')
addShare(self.server.baseDir, addShare(self.server.baseDir,
self.server.httpPrefix, self.server.httpPrefix,
nickname, nickname,