소스 검색

fix: simplify condition

version-14
Sagar Vora 2 년 전
부모
커밋
e8623dbc19
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -3
      frappe/handler.py

+ 1
- 3
frappe/handler.py 파일 보기

@@ -206,9 +206,7 @@ def upload_file():
frappe.local.uploaded_file = content
frappe.local.uploaded_filename = filename

if (not file_url or content) and (
frappe.session.user == "Guest" or (user and not user.has_desk_access())
):
if content and (frappe.session.user == "Guest" or (user and not user.has_desk_access())):
filetype = guess_type(filename)[0]
if filetype not in ALLOWED_MIMETYPES:
frappe.throw(_("You can only upload JPG, PNG, PDF, TXT or Microsoft documents."))


불러오는 중...
취소
저장