ソースを参照

refactor: add reload function back

Assigning a function to a different name breaks inheritance model.

E.g. doc.reload() won't call virtual doctype's load_from_db but call
original load_from_db
version-14
Ankush Menat 2年前
コミット
f1d638473f
1個のファイルの変更3行の追加1行の削除
  1. +3
    -1
      frappe/model/document.py

+ 3
- 1
frappe/model/document.py ファイルの表示

@@ -179,7 +179,9 @@ class Document(BaseDocument):
if hasattr(self, "__setup__"):
self.__setup__()

reload = load_from_db
def reload(self):
"""Reload document from database"""
self.load_from_db()

def get_latest(self):
if not getattr(self, "latest", None):


読み込み中…
キャンセル
保存