Skip to content

[Bug] Re-locking a changed metadata field before saving causes HTTP 400 error #328

Description

@van-geaux

What went wrong?

When editing metadata, saving fails with an HTTP 400 error if a locked field is unlocked, changed, locked again, and then saved.

The only workaround is to save in two separate steps:

Unlock the field.
Change the field value.
Save.
Lock the field again.
Save again.

I cannot test whether this is a consequence of c32babb, or whether it can be fixed separately.

Steps to reproduce

  1. Open the metadata editor for a book.
  2. Choose a metadata field that is currently locked.
  3. Unlock the field.
  4. Change the field value.
  5. Lock the field again before saving.
  6. Click save.

Expected vs actual behavior

Expected behaviour:
It should be possible to unlock a metadata field, change its value, re-lock it, and save everything successfully in one save action.

Actual behaviour:
Saving fails with an HTTP 400 error when the field is changed and re-locked before saving. The change only works if the field is unlocked, changed, saved, then locked and saved again.

Your setup

BookOrbit version tag: 1.10.0
Deployment: docker
OS: Debian Trixie
Browser: Firefox 151.0.4

Relevant logs (optional)

Screenshots (optional)

No response

Before submitting

  • I've searched existing issues and this hasn't been reported yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleasedIssue or PR is included in a released version.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions