Issue #2977
Attributes on KeyValueRelatedFields are not used by DRF
Description
Attributes on NotesKeyValueRelatedField[0] does not get picked up by DRF. This is evidenced by the help_text not showing up, and by DRF returning "This field is required." even when required is set to False.
If required is set to False on initialization of Notes field in the RepositorySeralizer[1]
notes = NotesKeyValueRelatedField(required=False)
DRF then picks up this field.
[0] https://github.com/pulp/pulp/blob/3.0-dev/platform/pulpcore/app/serializers/generic.py#L16
[1] https://github.com/pulp/pulp/blob/3.0-dev/platform/pulpcore/app/serializers/repository.py#L40
Related issues
Associated revisions
Revision 43ab81a0
View on GitHub
Remove Scratchpad and KeyValueRelatedFields
https://pulp.plan.io/issues/2977 https://pulp.plan.io/issues/2817
History
#1
Updated by amacdona@redhat.com over 3 years ago
- Related to Issue #2947: Notes field on the Repository model should default to {} added
#2
Updated by ttereshc over 3 years ago
- Sprint/Milestone set to 43
- Triaged changed from No to Yes
#3
Updated by bizhang over 3 years ago
- Status changed from NEW to POST
- Assignee set to bizhang
#4
Updated by werwty over 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|43ab81a0c092b34032ca0c3c130c12b946ed4a1e.
#5
Updated by bmbouter almost 3 years ago
- Sprint set to Sprint 24
#6
Updated by bmbouter almost 3 years ago
- Sprint/Milestone deleted (
43)
#7
Updated by daviddavis almost 2 years ago
- Sprint/Milestone set to 3.0.0
#8
Updated by bmbouter almost 2 years ago
- Tags deleted (
Pulp 3)
#9
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
Remove Scratchpad and KeyValueRelatedFields
closes #2977 closes #2817
https://pulp.plan.io/issues/2977 https://pulp.plan.io/issues/2817