Skip to content

Commit f3bbc11

Browse files
committed
fix(app): add verbose_name to App model due to a DRF 3.4.1 fix
encode/django-rest-framework#4299
1 parent 745d6d0 commit f3bbc11

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

rootfs/api/models/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class App(UuidAuditedModel):
8686
structure = JSONField(default={}, blank=True, validators=[validate_app_structure])
8787

8888
class Meta:
89+
verbose_name = 'Application'
8990
permissions = (('use_app', 'Can use app'),)
9091
ordering = ['id']
9192

rootfs/api/tests/deployments/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_app_override_id(self, mock_requests):
8888
self.assertEqual(response.status_code, 201, response.data)
8989
body = {'id': response.data['id']}
9090
response = self.client.post('/v2/apps', body)
91-
self.assertContains(response, 'App with this id already exists.', status_code=400)
91+
self.assertContains(response, 'Application with this id already exists.', status_code=400)
9292
return response
9393

9494
@mock.patch('requests.get')

rootfs/api/tests/test_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_app_override_id(self, mock_requests):
8686
self.assertEqual(response.status_code, 201, response.data)
8787
body = {'id': response.data['id']}
8888
response = self.client.post('/v2/apps', body)
89-
self.assertContains(response, 'App with this id already exists.', status_code=400)
89+
self.assertContains(response, 'Application with this id already exists.', status_code=400)
9090
return response
9191

9292
@mock.patch('requests.get')

0 commit comments

Comments
 (0)