Skip to content

Fix SectionService empty list validation #18

@NikosPoly

Description

@NikosPoly

Currently SectionService rejects empty lists [] for bookIds and employeeIds
during PATCH, making it impossible to intentionally clear a section's books or employees.

The intended behavior should be:

  • null — don't touch the list
  • [] — clear the list
  • ["id1", "id2"] — replace the list

However the correct approach for clearing a list via PATCH needs further consideration
before implementation.

Tasks

  • Decide on the correct approach for clearing a list via PATCH
  • Implement the chosen approach in SectionService
  • Verify that null vs empty list behavior works correctly after the fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityMake the code cleaner without changing behaviorhelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions