소스 검색

perf: move less expensive condition first

Co-authored-by: gavin <gavin18d@gmail.com>
version-14
Sagar Vora 3 년 전
committed by GitHub
부모
커밋
38959637e7
No known key found for this signature in database 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



불러오는 중...
취소
저장