Skip to content

fix: scope paragraph reorder updates to document#6384

Merged
liuruibin merged 1 commit into
1Panel-dev:v2from
zhonggang666:codex/fix-6373-paragraph-adjust-position-scope
Jul 10, 2026
Merged

fix: scope paragraph reorder updates to document#6384
liuruibin merged 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

@zhonggang666 zhonggang666 marked this pull request as ready for review July 9, 2026 13:13
@zhonggang666 zhonggang666 force-pushed the codex/fix-6373-paragraph-adjust-position-scope branch from efff93d to a1ac86c Compare July 9, 2026 13:15
@liuruibin liuruibin merged commit 0384855 into 1Panel-dev:v2 Jul 10, 2026
1 of 2 checks passed
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

2 participants