publish state may be null for draft apps
Merge pull request #337 from nelenkov/dev

publish state may be null for draft apps