Merge pull request #32273 from ankush/int_key_version

fix: Avoid unnecessary version logs for int PK
This commit is contained in:
Ankush Menat 2025-04-23 17:58:45 +05:30 committed by GitHub
commit 61b6e566cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 = {}