Merge pull request #782 from pdvyas/hotfix-filemanager-19aug

[minor] fix unbound local var in file_manager
This commit is contained in:
Nabin Hait 2014-08-19 17:19:17 +05:30
commit 2be8f347bf

View file

@ -182,6 +182,7 @@ def remove_all(dt, dn):
def remove_file(fid, attached_to_doctype=None, attached_to_name=None):
"""Remove file and File Data entry"""
file_name = None
if not (attached_to_doctype and attached_to_name):
attached = frappe.db.get_value("File Data", fid,
["attached_to_doctype", "attached_to_name", "file_name"])