i wan to override meta class but its not a doctype , so is there a way to overide it
Monkey patching might help but it’s not multi-tenancy safe. Also, overriding something so foundational as Meta
is probably not a good idea. Can you share your requirement to be able to extend Meta?
Traceback
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init .py”, line 1607, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/integrations/doctype/google_settings/google_settings.py”, line 15, in get_file_picker_settings
google_settings = frappe.get_single(“Google Settings”)
File “apps/frappe/frappe/init .py”, line 1204, in get_single
return get_doc(doctype, doctype)
File “apps/frappe/frappe/init .py”, line 1184, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 74, in get_doc
return controller(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 106, in init
self.load_from_db()
File “apps/frappe/frappe/model/document.py”, line 140, in load_from_db
super().init (single_doc)
File “apps/frappe/frappe/model/base_document.py”, line 105, in init
self._table_fieldnames = {df.fieldname for df in self._get_table_fields()}
File “apps/frappe/frappe/model/base_document.py”, line 294, in _get_table_fields
return self.meta.get_table_fields()
File “apps/frappe/frappe/model/meta.py”, line 211, in get_table_fields
return self._table_fields
AttributeError: ‘Meta’ object has no attribute ‘_table_fields’
i am getting this error, i am not getting any solution to resolve this
thats why i wanted to override this class