Преглед изворни кода

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 Key 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…
Откажи
Сачувај