Description of problem:
When saving untranslated entry in new editor, the revision field is null and will be rejected by server with 400 bad request. If project enables validation enforcement, if a message failed validation, the result comes back as 500 internal server error because server failed to store validation result in the list.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Find a project with validation e.g. enforce html/xml tag
2. Find a message that potentially can break validation and is untranslated
3. Open in new editor and fill in an invalid translation (e.g. missing a tag)
Can't save (need to view the result in browser console. New editor don't have a notification system other than console log)
Expected result should be:
Can't save invalid translation but won't cause a server NullPointerException. Client browser console log shows server returns 500.
The "real" expected behavior is ask the user to either save as "Need Work" or back to edit.
However, the scope of this bug is to remove the cause of NullPointerException.
VERIFIED with Zanata 3.6.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-2476)