fixes #5846 in master 2.5
Merge pull request #5858 from dotCMS/issue-5846-push-publish-workflow-fails

fixes #5846 in master 2.5