瀏覽代碼

perf: move less expensive condition first

Co-authored-by: gavin <gavin18d@gmail.com>
version-14
Sagar Vora 3 年之前
committed by GitHub
父節點
當前提交
38959637e7
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      frappe/model/meta.py

+ 2
- 2
frappe/model/meta.py 查看文件

@@ -143,8 +143,8 @@ class Meta(Document):
value = [serialize(d) for d in value]

if (
isinstance(value, (str, int, float, datetime, list, tuple))
or (not no_nulls and value is None)
(not no_nulls and value is None)
or isinstance(value, (str, int, float, datetime, list, tuple))
):
out[key] = value



Loading…
取消
儲存