Add reversed relationship.

This commit is contained in:
Aaron Tan
2016-11-25 22:02:23 -05:00
parent 87bf7d22e1
commit 8eb4b7b271
3 changed files with 11 additions and 0 deletions

View File

@@ -764,6 +764,15 @@ class OrganizationProjectsList(SubListCreateAttachDetachAPIView):
parent_key = 'organization'
class OrganizationWorkflowJobTemplatesList(SubListCreateAttachDetachAPIView):
model = WorkflowJobTemplate
serializer_class = WorkflowJobTemplateListSerializer
parent_model = Organization
relationship = 'workflows'
parent_key = 'organization'
class OrganizationTeamsList(SubListCreateAttachDetachAPIView):
model = Team