浏览代码

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

[minor] fix unbound local var in file_manager
version-14
Nabin Hait 11 年前
父节点
当前提交
2be8f347bf
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. +1
    -0
      frappe/utils/file_manager.py

+ 1
- 0
frappe/utils/file_manager.py 查看文件

@@ -182,6 +182,7 @@ def remove_all(dt, dn):


def remove_file(fid, attached_to_doctype=None, attached_to_name=None): def remove_file(fid, attached_to_doctype=None, attached_to_name=None):
"""Remove file and File Data entry""" """Remove file and File Data entry"""
file_name = None
if not (attached_to_doctype and attached_to_name): if not (attached_to_doctype and attached_to_name):
attached = frappe.db.get_value("File Data", fid, attached = frappe.db.get_value("File Data", fid,
["attached_to_doctype", "attached_to_name", "file_name"]) ["attached_to_doctype", "attached_to_name", "file_name"])


正在加载...
取消
保存