Skip to content

fix: scope paragraph reorder updates to document#6384

Draft
zhonggang666 wants to merge 1 commit into
1Panel-dev:v2from
zhonggang666:codex/fix-6373-paragraph-adjust-position-scope
Draft

fix: scope paragraph reorder updates to document#6384
zhonggang666 wants to merge 1 commit into
1Panel-dev:v2from
zhonggang666:codex/fix-6373-paragraph-adjust-position-scope

Conversation

@zhonggang666

Copy link
Copy Markdown
Contributor

Summary

  • Scope paragraph reorder range updates to the current document.
  • Validate the moved paragraph against the requested knowledge/document path before adjusting positions.

Root cause

adjust_position shifted paragraphs only by position range, so documents sharing the same position values could be updated together.

Validation

  • python -m py_compile apps\knowledge\serializers\paragraph.py
  • git diff --check

Fixes #6373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] adjust_position 方法缺少 document_id 过滤条件,导致拖拽段落时跨文档污染所有段落的 position

1 participant