mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-09 16:11:45 +00:00
Performance: replace django-treenode with adjacency-list tags (#14612)
--------- Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user