Skip to content

Commit

Permalink
Merge pull request allegro#3792 from lukaszkarykowski/new_status_repl…
Browse files Browse the repository at this point in the history
…acement

ITS-488335 | new status for backoffice assets.
  • Loading branch information
awieckowski authored Mar 1, 2024
2 parents fa0ae45 + 71b7518 commit 685d65e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/ralph/back_office/migrations/0023_auto_20240223_1018.py
Original file line number Diff line number Diff line change
@@ -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')]),
),
]
1 change: 1 addition & 0 deletions src/ralph/back_office/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class BackOfficeAssetStatus(Choices):
quarantine = _("quarantine")
refurbished = _("refurbished")
reserved_to_order = _("reserved to order")
replacement = _("replacement")


class OfficeInfrastructure(
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/data_importer/tests/test_demo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 685d65e

Please sign in to comment.