`DotPathValueMixin` raises a list-shaped validation error

Open Beginner friendly
#6,395 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in contentcuration/contentcuration/viewsets/common.py at DotPathValueMixin.get_value, then compare its behavior with the per-field validation strategy in issue #6387. Add regression coverage for the listed /api/channel and /api/channelset inputs; done when each returns 400 with the error under the offending field's name.

Written by the indexing model from the issue text.

Description

DEV: backend

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

DotPathValueMixin.get_value raises a DRF ValidationError with a list detail when a field's value isn't an object. It raises from get_value, outside the per-field error handling in Serializer.to_internal_value, so is_valid() fails to build the error dict and the REST request returns 500. Any logged-in user can trigger it on channel and channelset create.

Complexity: Low
Target branch: hotfixes

Context
The Change
  • A non-object value for a field using DotPathValueMixin should produce a normal field error on that field, following the strategy in #6387.
Acceptance Criteria
General
  • Every input in Context returns 400 with the error under the offending field's name.
Testing
  • Each input in Context has a regression test.

AI usage

I scoped the audit and chose the validation strategy in #6387. Claude Code found and reproduced these failures and drafted this issue.

Dominant language
JavaScript
Stars
214
Forks
327
Avg merge
17h 5m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from learningequality/studio

All issues in learningequality/studio

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.