Performance: replace django-treenode with adjacency-list tags (#14612)

---------

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
This commit is contained in:
shamoonandCodex authored and GitHub committed 2026-11-06 20:18:59 +00:00
1 parent d14cfc93f4
commit 8aa99a381a
14 files changed
+392 -121

No files matched your search

@@ -108,6 +108,24 @@ def _deserialize_record(
) from e
for field_name, field_value in record.get("fields", {}).items():
# Older exports include django-treenode's derived bookkeeping. The
# parent FK is authoritative; accept only these known removed fields.
if Model is Tag and field_name in {
"tn_ancestors_count",
"tn_ancestors_pks",
"tn_children_count",
"tn_children_pks",
"tn_depth",
"tn_descendants_count",
"tn_descendants_pks",
"tn_index",
"tn_level",
"tn_order",
"tn_priority",
"tn_siblings_count",
"tn_siblings_pks",
}:
continue
field = Model._meta.get_field(field_name)
remote = field.remote_field