Merge pull request #32273 from ankush/int_key_version
fix: Avoid unnecessary version logs for int PK
This commit is contained in:
commit
61b6e566cb
1 changed files with 3 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import json
|
|||
import frappe
|
||||
from frappe.model import no_value_fields, table_fields
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cstr
|
||||
|
||||
FIELDTYPES_TO_IGNORE = frozenset(fieldtype for fieldtype in no_value_fields if fieldtype not in table_fields)
|
||||
|
||||
|
|
@ -116,6 +117,8 @@ def get_diff(old, new, for_child=False, compare_cancelled=False):
|
|||
continue
|
||||
|
||||
old_value, new_value = old.get(df.fieldname), new.get(df.fieldname)
|
||||
if df.fieldtype in ("Link", "Dynamic Link"):
|
||||
old_value, new_value = cstr(old_value), cstr(new_value)
|
||||
|
||||
if not for_child and df.fieldtype in table_fields:
|
||||
old_rows_by_name = {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue