bhavesh95863 / whitelabel

Whitelabel ERPNext
MIT License
152 stars 164 forks source link

I am getting this error #24

Open afaytrouni opened 1 year ago

afaytrouni commented 1 year ago

Hello, when i try to upload or edit anything in the whitelabel module i get this error

App Versions

{
"erpnext": "13.49.11",
"frappe": "13.52.0",
"whitelabel": "0.0.1"
}

Route

Form/Whitelabel Setting/Whitelabel Setting

Trackeback

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 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1473, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 24, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 312, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 349, in _save
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1054, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 943, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 940, in fn
    return method_object(*args, **kwargs)
  File "apps/whitelabel/whitelabel/whitelabel/doctype/whitelabel_setting/whitelabel_setting.py", line 14, in validate
    if cint(get_frappe_version()) >= 13:
  File "apps/whitelabel/whitelabel/api.py", line 23, in get_frappe_version
    return frappe.db.get_value("Installed Application",{"app_name":"frappe"},"app_version").split('.')[0]
AttributeError: 'NoneType' object has no attribute 'split'

Request Data

{
"type": "POST",
"args": {
"doc": "{\"name\":\"Whitelabel Setting\",\"owner\":\"Administrator\",\"creation\":\"2023-04-09 19:13:40.145281\",\"modified\":\"2023-04-09 19:13:40.145281\",\"modified_by\":\"Administrator\",\"idx\":\"0\",\"docstatus\":0,\"ignore_onboard_whitelabel\":0,\"show_help_menu\":0,\"disable_new_update_popup\":1,\"app_logo_set\":0,\"doctype\":\"Whitelabel Setting\",\"__last_sync_on\":\"2023-04-15T05:36:22.809Z\",\"__unsaved\":1,\"application_logo\":\"/private/files/IMG_1852.png\"}",
"action": "Save"
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs"
}

Response Data

{
"exception": "AttributeError: 'NoneType' object has no attribute 'split'"
}