Project

Profile

Help

Issue #3587

closed

Multiple serializers doesn't work for detail viewsets types

Added by dalley almost 6 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 37
Quarter:

Description

In the "NamedModelViewSet", we overrode "get_serializer_class()" so that derivative viewsets like TaskViewSet can define different serializers for different actions. This works for Task, but it does not work for viewsets derived from other viewsets.

For instance, it is non-functional on PythonPackageContentViewSet, which inherits from ContentViewSet, which inherits from NamedModelViewSet.

Actions #1

Updated by amacdona@redhat.com almost 6 years ago

dalley, so we need to move the get_serializer_class override out of the base class and into the TaskSerializer?

Actions #2

Updated by amacdona@redhat.com almost 6 years ago

also, what specific errors does this cause?

Actions #3

Updated by amacdona@redhat.com almost 6 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 36
Actions #4

Updated by dalley almost 6 years ago

There were no errors, but the multiple serializers part did not work for me. It just used the "default" serializer class for everything. Not fully sure why or how best to solve it since I didn't dig too deep at the time.

Actions #5

Updated by dalley almost 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #6

Updated by dalley almost 6 years ago

  • Status changed from ASSIGNED to POST
Actions #7

Updated by rchan almost 6 years ago

  • Sprint changed from Sprint 36 to Sprint 37
Actions #8

Updated by dalley almost 6 years ago

  • Status changed from POST to ASSIGNED

Issues with this approach, moving out of POST until it can be figured out

Actions #9

Updated by dalley almost 6 years ago

  • Status changed from ASSIGNED to POST

Added by dalley almost 6 years ago

Revision 4587e0ed | View on GitHub

Fixes using multiple serializers on derived viewsets

closes #3587 https://pulp.plan.io/issues/3587

Added by dalley almost 6 years ago

Revision 4587e0ed | View on GitHub

Fixes using multiple serializers on derived viewsets

closes #3587 https://pulp.plan.io/issues/3587

Actions #10

Updated by dalley almost 6 years ago

  • Status changed from POST to MODIFIED
Actions #11

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #12

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #13

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF