Clearer logic

main
Bob Mottram 2020-11-05 23:18:48 +00:00
parent e5b5928a64
commit 80f4692813
1 changed files with 8 additions and 9 deletions

View File

@ -10880,17 +10880,16 @@ class PubServer(BaseHTTPRequestHandler):
citationsButtonPress = True citationsButtonPress = True
print('citationstest: 0b ' + str(citationsButtonPress)) print('citationstest: 0b ' + str(citationsButtonPress))
# process the received text fields from the POST if not citationsButtonPress:
if not fields.get('message') and \ # process the received text fields from the POST
not fields.get('imageDescription'): if not fields.get('message') and \
if not citationsButtonPress: not fields.get('imageDescription'):
return -1 return -1
if fields.get('submitPost'): if fields.get('submitPost'):
if fields['submitPost'] != self.server.translate['Submit']: if fields['submitPost'] != self.server.translate['Submit']:
if not citationsButtonPress:
return -1 return -1
else: else:
return 2 return 2
if not fields.get('imageDescription'): if not fields.get('imageDescription'):
fields['imageDescription'] = None fields['imageDescription'] = None