Project

Profile

Help

Issue #2977

Attributes on KeyValueRelatedFields are not used by DRF

Added by bizhang about 2 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 24

Description

Attributes on NotesKeyValueRelatedField0 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 RepositorySeralizer1

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

Related to Pulp - Issue #2947: Notes field on the Repository model should default to {} CLOSED - WONTFIX Actions

Associated revisions

History

#1 Updated by amacdona@redhat.com about 2 years ago

  • Related to Issue #2947: Notes field on the Repository model should default to {} added

#2 Updated by ttereshc about 2 years ago

  • Sprint/Milestone set to 43
  • Triaged changed from No to Yes

#3 Updated by bizhang about 2 years ago

  • Status changed from NEW to POST
  • Assignee set to bizhang

#4 Updated by werwty about 2 years ago

  • Status changed from POST to MODIFIED

#5 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 24

#6 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (43)

#7 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#8 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF