Selaa lähdekoodia

perf: move less expensive condition first

Co-authored-by: gavin <gavin18d@gmail.com>
version-14
Sagar Vora 3 vuotta sitten
committed by GitHub
vanhempi
commit
38959637e7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. +2
    -2
      frappe/model/meta.py

+ 2
- 2
frappe/model/meta.py Näytä tiedosto

@@ -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



Ladataan…
Peruuta
Tallenna