Преглед на файлове

fix(Kanban Board): Clear user settings & dpctype cache on_change

Deletion of kanban boards may lead to 404s on clicking on the Kanban
option in the views. This is due to the cache not being synced with the
DB changes. Changed the hook to on_change since it gets triggered even
in db_set.
version-14
Gavin D'souza преди 3 години
родител
ревизия
fd0564953b
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. +2
    -1
      frappe/desk/doctype/kanban_board/kanban_board.py

+ 2
- 1
frappe/desk/doctype/kanban_board/kanban_board.py Целия файл

@@ -12,8 +12,9 @@ class KanbanBoard(Document):
def validate(self):
self.validate_column_name()

def on_update(self):
def on_change(self):
frappe.clear_cache(doctype=self.reference_doctype)
frappe.cache().delete_keys("_user_settings")

def before_insert(self):
for column in self.columns:


Зареждане…
Отказ
Запис