Skip to content

Commit

Permalink
Fix review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ycheng-aa committed Aug 7, 2015
1 parent 9982836 commit ada1f64
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pdc/apps/compose/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1242,22 +1242,14 @@ class FindLatestComposeByComposeRPMViewSet(StrictQueryParamMixin, FindComposeMix
which contains a different version of the specified package.
"""
queryset = ComposeRPM.objects.none() # Required for permissions
extra_query_params = ('to_dict', 'included_compose_type', 'excluded_compose_type', 'latest')
extra_query_params = ('included_compose_type', 'excluded_compose_type')

def list(self, request, **kwargs):
"""
This method is to find the latest compose older than specified compose
which contains a different version of the specified package when given a
compose and a package.
The ordering of composes is performed by the *productmd* library. It
first compares compose date, then compose type
(`test` < `nightly` < `production`) and lastly respin.
This method will find the latest one according to above sequence.
`latest` is optional parameter. If it is provided, and the value is True, it will
return a single pair with the latest compose and its version of the packages.
__Method__: GET
Expand All @@ -1269,7 +1261,6 @@ def list(self, request, **kwargs):
* `included_compose_type`: optional
* `excluded_compose_type`: optional
* `latest`: optional
__Response__:
Expand All @@ -1285,8 +1276,6 @@ def list(self, request, **kwargs):
"""
self.included_compose_type = request.query_params.get('included_compose_type')
self.excluded_compose_type = request.query_params.get('excluded_compose_type')
self._get_query_param_or_false(request, 'to_dict')
self._get_query_param_or_false(request, 'latest')
self.compose_id = kwargs.get('compose_id')
self.rpm_name = kwargs.get('rpm_name')
return Response(self._get_older_compose())
Expand Down

0 comments on commit ada1f64

Please sign in to comment.