From 454be83ed7ece05067f4d7990b162f100cc36b4e Mon Sep 17 00:00:00 2001 From: "lukasz.karykowski" Date: Fri, 23 Feb 2024 10:19:52 +0100 Subject: [PATCH] ITS-488335 | new status for backoffice assets. --- .../migrations/0023_auto_20240223_1018.py | 20 +++++++++++++++++++ src/ralph/back_office/models.py | 2 +- .../data_importer/tests/test_demo_data.py | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/ralph/back_office/migrations/0023_auto_20240223_1018.py diff --git a/src/ralph/back_office/migrations/0023_auto_20240223_1018.py b/src/ralph/back_office/migrations/0023_auto_20240223_1018.py new file mode 100644 index 0000000000..4523db41a6 --- /dev/null +++ b/src/ralph/back_office/migrations/0023_auto_20240223_1018.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import ralph.lib.transitions.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('back_office', '0022_auto_20230616_1235'), + ] + + operations = [ + migrations.AlterField( + model_name='backofficeasset', + name='status', + field=ralph.lib.transitions.fields.TransitionField(default=1, choices=[(1, 'new'), (2, 'in progress'), (3, 'waiting for release'), (4, 'in use'), (5, 'loan'), (6, 'damaged'), (7, 'liquidated'), (8, 'in service'), (9, 'installed'), (10, 'free'), (11, 'reserved'), (12, 'sale'), (13, 'loan in progress'), (14, 'return in progress'), (15, 'to find'), (16, 'sent'), (17, 'to buyout'), (18, 'in use team'), (19, 'in use test'), (20, 'in progress team'), (21, 'in progress test'), (22, 'quarantine'), (23, 'refurbished'), (24, 'reserved to order'), (25, 'replacement')]), + ), + ] diff --git a/src/ralph/back_office/models.py b/src/ralph/back_office/models.py index cc595e99aa..002063ce22 100644 --- a/src/ralph/back_office/models.py +++ b/src/ralph/back_office/models.py @@ -90,7 +90,7 @@ class BackOfficeAssetStatus(Choices): quarantine = _("quarantine") refurbished = _("refurbished") reserved_to_order = _("reserved to order") - + replacement = _("replacement") class OfficeInfrastructure( AdminAbsoluteUrlMixin, diff --git a/src/ralph/data_importer/tests/test_demo_data.py b/src/ralph/data_importer/tests/test_demo_data.py index b7e37549f7..379e510226 100644 --- a/src/ralph/data_importer/tests/test_demo_data.py +++ b/src/ralph/data_importer/tests/test_demo_data.py @@ -11,5 +11,5 @@ class DemoDataTestCase(TestCase): def test_demo_data_command(self): management.call_command('demodata') self.assertEqual(DataCenterAsset.objects.count(), 422) - self.assertEqual(BackOfficeAsset.objects.count(), 276) + self.assertEqual(BackOfficeAsset.objects.count(), 280) self.assertEqual(get_user_model().objects.count(), 33)