Explorar el Código

Merge pull request #2118 from neilLasrado/develop

Fix - add role to roles table if mentioned in hooks portal menu items
version-14
Nabin Hait hace 8 años
committed by GitHub
padre
commit
affa40db83
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. +2
    -0
      frappe/website/doctype/portal_settings/portal_settings.py

+ 2
- 0
frappe/website/doctype/portal_settings/portal_settings.py Ver fichero

@@ -28,6 +28,8 @@ class PortalSettings(Document):
'''Sync portal menu items'''
dirty = False
for item in frappe.get_hooks('portal_menu_items'):
if item.get('role') and not frappe.db.exists("Role", item.get('role')):
frappe.get_doc({"doctype": "Role", "role_name": item.get('role'), "desk_access": 0}).insert()
if self.add_item(item):
dirty = True



Cargando…
Cancelar
Guardar