Skip to content

Commit

Permalink
Merge branch 'ng' of github.com:allegro/ralph into bump-to-django-1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
matyldv committed Sep 18, 2024
2 parents 537c06c + 18ce7df commit 468b9fd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
20 changes: 20 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
ralph (20240916.1) bionic; urgency=medium

[ Olga Matyla ]
* Add missing error message for property of field

-- Olga Matyla <[email protected]> Mon, 16 Sep 2024 14:01:15 +0000

ralph (20240910.1) bionic; urgency=medium

[ Paweł Szulc ]
* Spaces in serial number and barcode are now forbidden
* Add missing migration

[ Olga Matyla ]
* Require field property_of
* Fix clean method
* Require service environment

-- Paweł Szulc <[email protected]> Tue, 10 Sep 2024 11:24:19 +0000

ralph (20240903.2) bionic; urgency=medium

* Fix ipxe (#3841)
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/assets/models/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def clean(self):
error_message = [_('Property of field is required')]
errors.update(
{
'property_of': error_message,
'__all__': error_message,
}
)
if errors:
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/back_office/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_create_back_office_asset_without_property_of(self):
response = self.client.post(url, data, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(response.data, {
'property_of': ['Property of field is required'],
'__all__': ['Property of field is required'],
})

def test_patch_back_office_asset(self):
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/data_center/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_create_data_center_without_property_of(self):
response = self.client.post(url, data, format='json')
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(response.data, {
'property_of': ['Property of field is required'],
'__all__': ['Property of field is required'],
})

def test_patch_data_center_asset(self):
Expand Down

0 comments on commit 468b9fd

Please sign in to comment.