Skip to content

Allow label edits to round-trip the path fields - #381

Closed
level09 wants to merge 1 commit into
mainfrom
fix/label-edit-extra-fields
Closed

Allow label edits to round-trip the path fields#381
level09 wants to merge 1 commit into
mainfrom
fix/label-edit-extra-fields

Conversation

@level09

@level09 level09 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Label.to_dict() returns path / path_ar (added in #369), and the admin edit form PUTs that payload straight back. LabelValidationModel is strict, so every label edit fails with:

[path]: Extra field not allowed
[path_ar]: Extra field not allowed

Adds both to the same discard list that already carries id, order, updated_at, parent_label_id and children.

Reported by @apodacaduron on #378.

Tests

  • New regression test PUTs a label's own to_dict() back and expects 200 (fails with 400 without the fix).
  • uv run pytest: 869 passed, 4 skipped.

@level09
level09 requested a review from apodacaduron as a code owner July 25, 2026 10:44
@level09 level09 self-assigned this Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c837968-4a08-42d1-a392-e86db40c79ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/label-edit-extra-fields

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@level09

level09 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #378 instead, same author, and that PR is already approved.

@level09 level09 closed this Jul 25, 2026
@level09
level09 deleted the fix/label-edit-extra-fields branch July 25, 2026 10:47
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.

1 participant