Skip to content

Commit 3bb67dd

Browse files
committed
ref(models): remove Deis-Release header as it is no longer used
1 parent 4393d48 commit 3bb67dd

3 files changed

Lines changed: 1 addition & 15 deletions

File tree

rootfs/api/tests/test_build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def test_build(self, mock_requests):
6868
body = {'image': 'autotest/example'}
6969
response = self.client.post(url, body)
7070
self.assertEqual(response.status_code, 201)
71-
self.assertIn('deis-release', response._headers)
7271
build3 = response.data
7372
self.assertEqual(response.data['image'], body['image'])
7473
self.assertNotEqual(build2['uuid'], build3['uuid'])

rootfs/api/views.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,11 @@ def create(self, request, **kwargs):
177177

178178

179179
class ReleasableViewSet(AppResourceViewSet):
180-
"""A viewset for application resources which affect the release cycle.
181-
182-
When a resource is created, a new release is created for the application
183-
and it returns some success headers regarding the new release.
184-
185-
To use it, at minimum you'll need to provide a `release` attribute tied to your class before
186-
calling post_save().
187-
"""
180+
"""A viewset for application resources which affect the release cycle."""
188181
def get_object(self):
189182
"""Retrieve the object based on the latest release's value"""
190183
return getattr(self.get_app().release_set.latest(), self.model.__name__.lower())
191184

192-
def get_success_headers(self, data, **kwargs):
193-
headers = super(ReleasableViewSet, self).get_success_headers(data)
194-
headers.update({'Deis-Release': self.release.version})
195-
return headers
196-
197185

198186
class AppViewSet(BaseDeisViewSet):
199187
"""A viewset for interacting with App objects."""

rootfs/deis/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@
128128
CORS_EXPOSE_HEADERS = (
129129
'DEIS_API_VERSION',
130130
'DEIS_PLATFORM_VERSION',
131-
'Deis-Release',
132131
)
133132

134133
X_FRAME_OPTIONS = 'DENY'

0 commit comments

Comments
 (0)