fixed "small" logic error
reverted previous change because it worked correctly and made API return always published data
Merge branch 'bugid-95788-api-returns-only-published-data' into consumer-sprint27-bugid-95788