Fix for the exception which occurs while editing a wep app in tenant mode

Provides fix for https://wso2.org/jira/browse/APPM-250