diff --git a/webinterface.py b/webinterface.py
index ba0389b9..cd1d0549 100644
--- a/webinterface.py
+++ b/webinterface.py
@@ -1425,7 +1425,7 @@ def individualPostAsHtml(baseDir: str, \
postDomain=postDomain.split('/',1)[0]
titleStr+='
'+postDomain+''
attachmentStr=''
- if postJsonObject['object']['attachment']:
+ if postJsonObject['object'].get('attachment'):
if isinstance(postJsonObject['object']['attachment'], list):
attachmentCtr=0
attachmentStr+='