fix bug with editing a post that previously had attachments but now does
not (caused a nullpointerexception)