marshmallow-code / marshmallow-code/flask-marshmallow

File(allow_none=True) is not possible

Open
#319 11 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
887
Forks
65
Avg merge
7h 25m
Merged PRs (30d)
3

Description

Hi team,

Is there interest in making `File(allow_none=True)`?
This would allow to send `None` to file and it being validated as valid.
The use case is to delete the file when editing a resource (set it to None to delete it).
I can make pull request.

Contributor guide

Open the contributing guide

Research direction

Start by locating the File field implementation and its validation tests, then trace how allow_none is handled. Done means File(allow_none=True) accepts None for the stated edit/delete use case, with regression coverage for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.