Merge pull request #834 from anandpdoshi/anand-september-10

[fix] File Manager
[permissions] Query Report: don't use a doctype for filtering User Permissions, if the column representing this doctype is empty