fix: Don't check PDF content if not defined (#33914)
This commit is contained in:
parent
bdcd7c8eed
commit
64aa4787be
1 changed files with 1 additions and 1 deletions
|
|
@ -390,7 +390,7 @@ class File(Document):
|
|||
)
|
||||
|
||||
def check_content(self):
|
||||
if self.file_type == "PDF" and not pdf_contains_js(self._content):
|
||||
if self.file_type == "PDF" and self._content and not pdf_contains_js(self._content):
|
||||
frappe.throw(_("PDF cannot be uploaded, It contains unsafe content"))
|
||||
|
||||
def validate_duplicate_entry(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue