fixes #5787 Cant add events
Merge pull request #5794 from dotCMS/issue-5787-Cant-add-events

fixes #5787 Cant add events