LPS-36541 Cannot delete document in Documents and Media

Hey Eduardo, this fix is actually included in the pull I sent you for LPS-35477. So you can close this if you see fit.