mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fix: cannot find attached key file
This commit is contained in:
@@ -21,6 +21,6 @@ class EInvoiceSettings(Document):
|
|||||||
self.public_key = self.read_key_file()
|
self.public_key = self.read_key_file()
|
||||||
|
|
||||||
def read_key_file(self):
|
def read_key_file(self):
|
||||||
key_file = frappe.get_doc('File', dict(attached_to_name=self.doctype, attached_to_field='public_key_file'))
|
key_file = frappe.get_doc('File', dict(attached_to_name=self.doctype))
|
||||||
with open(key_file.get_full_path(), 'rb') as f:
|
with open(key_file.get_full_path(), 'rb') as f:
|
||||||
return cstr(f.read())
|
return cstr(f.read())
|
||||||
Reference in New Issue
Block a user