Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3527 from mboersma/single-domain-removal
Browse files Browse the repository at this point in the history
fix(controller): return the correct domain from get_object()
  • Loading branch information
mboersma committed Apr 19, 2015
2 parents 86b3b09 + 261d155 commit 7f6099c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions controller/api/tests/test_domain.py
Expand Up @@ -7,7 +7,6 @@
from __future__ import unicode_literals

import json
import unittest

from django.contrib.auth.models import User
from django.test import TestCase
Expand Down Expand Up @@ -102,7 +101,6 @@ def test_delete_domain_does_not_remove_latest(self):
with self.assertRaises(Domain.DoesNotExist):
Domain.objects.get(domain=test_domains[0])

@unittest.skip(".get_object() returns all domains instead of the requested domain")
def test_delete_domain_does_not_remove_others(self):
"""https://github.com/deis/deis/issues/3475"""
self.test_delete_domain_does_not_remove_latest()
Expand Down
3 changes: 2 additions & 1 deletion controller/api/views.py
Expand Up @@ -218,7 +218,8 @@ class DomainViewSet(AppResourceViewSet):
serializer_class = serializers.DomainSerializer

def get_object(self, **kwargs):
return self.get_queryset(**kwargs)
qs = self.get_queryset(**kwargs)
return qs.get(domain=self.kwargs['domain'])


class CertificateViewSet(BaseDeisViewSet):
Expand Down

0 comments on commit 7f6099c

Please sign in to comment.