mirror of https://gitlab.com/bashrc2/epicyon
Check for dict
parent
5bf2b059e0
commit
e0613d9469
|
@ -1350,7 +1350,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
|
||||
# check if replying is permitted
|
||||
commentsEnabled = True
|
||||
if 'commentsEnabled' in postJsonObject['object']:
|
||||
if isinstance(postJsonObject['object'], dict) and \
|
||||
'commentsEnabled' in postJsonObject['object']:
|
||||
if postJsonObject['object']['commentsEnabled'] is False:
|
||||
commentsEnabled = False
|
||||
elif 'rejectReplies' in postJsonObject['object']:
|
||||
|
@ -1358,6 +1359,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
commentsEnabled = False
|
||||
|
||||
conversationId = None
|
||||
if isinstance(postJsonObject['object'], dict) and \
|
||||
'conversation' in postJsonObject['object']:
|
||||
if postJsonObject['object']['conversation']:
|
||||
conversationId = postJsonObject['object']['conversation']
|
||||
|
||||
|
|
Loading…
Reference in New Issue