mirror of https://gitlab.com/bashrc2/epicyon
Additional checks
parent
2bfc4fad10
commit
31deda0a58
12
posts.py
12
posts.py
|
@ -4995,6 +4995,10 @@ def editedPostFilename(baseDir: str, nickname: str, domain: str,
|
|||
"""
|
||||
if not hasObjectDict(postJsonObject):
|
||||
return ''
|
||||
if not postJsonObject.get('type'):
|
||||
return ''
|
||||
if not postJsonObject['object'].get('type'):
|
||||
return ''
|
||||
if not postJsonObject['object'].get('published'):
|
||||
return ''
|
||||
if not postJsonObject['object'].get('id'):
|
||||
|
@ -5029,6 +5033,14 @@ def editedPostFilename(baseDir: str, nickname: str, domain: str,
|
|||
lastpostJson = loadJson(lastpostFilename, 0)
|
||||
if not lastpostJson:
|
||||
return ''
|
||||
if not lastpostJson.get('type'):
|
||||
return ''
|
||||
if lastpostJson['type'] != postJsonObject['type']:
|
||||
return ''
|
||||
if not lastpostJson['object'].get('type'):
|
||||
return ''
|
||||
if lastpostJson['object']['type'] != postJsonObject['object']['type']:
|
||||
return
|
||||
if not lastpostJson['object'].get('published'):
|
||||
return ''
|
||||
if not lastpostJson['object'].get('id'):
|
||||
|
|
Loading…
Reference in New Issue