Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

M2M model field withoutblank=True should map to a serializer relationship withallow_empty=False. #2804

Closed
Labels
Milestone
@marccerrato

Description

@marccerrato

The Django 1.8 system check framework displays the warningfields.W340 when thenull parameter is defined on aManyToManyField, since it has no effect.

Thisnull field affects on whether a related field in a model serializer is considered required or not. We can see ithere.

From my point of view, this behavior is correct for aForeignKey but not for aManyToManyField, that should be considered not required by default.

Adding the varto_many to the condition on the aforementioned code might do the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp