Check post type

master
Bob Mottram 2019-07-12 11:06:36 +01:00
parent 94a2e495b6
commit dec34f9941
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ def undoLikesCollectionEntry(postFilename: str,objectUrl: str, actor: str,debug:
""" """
with open(postFilename, 'r') as fp: with open(postFilename, 'r') as fp:
postJson=commentjson.load(fp) postJson=commentjson.load(fp)
if not postJson.get('type'):
if not postJson['type']=='Create':
return
return
if not postJson.get('object'): if not postJson.get('object'):
if debug: if debug:
pprint(postJson) pprint(postJson)