fix the pre-selection of unknown category that throws an exception
re-organize code, remove blank line
Merge pull request #338 from akeneo/PIM-1255

fix the pre-selection of unknown category that throws an exception
Merge branch 'master' into update_bap_beta