From 02df5b5ea9a560ce893a188fbd9f4d665df761ae Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Wed, 27 Dec 2023 16:31:37 +0800 Subject: [PATCH] Update postmgiration script for equipments --- equipment_tracker/equipments/models.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/equipment_tracker/equipments/models.py b/equipment_tracker/equipments/models.py index 7c4119e..47a8950 100644 --- a/equipment_tracker/equipments/models.py +++ b/equipment_tracker/equipments/models.py @@ -72,12 +72,12 @@ def create_superuser(sender, **kwargs): ) if (CREATED): print('Created Equipment: ' + data['name']) - # Generate 3 equipment instances per SKU - for x in range(3): - EQUIPMENT_INSTANCE = EquipmentInstance.objects.create( - equipment=EQUIPMENT, - status='Available', - remarks=data['remarks'] - ) - print('Created Equipment Instances: ' + - EQUIPMENT_INSTANCE.equipment.name) + # Generate 3 equipment instances per SKU + for x in range(3): + EQUIPMENT_INSTANCE = EquipmentInstance.objects.create( + equipment=EQUIPMENT, + status='Available', + remarks=data['remarks'] + ) + print('Created Equipment Instances: ' + + EQUIPMENT_INSTANCE.equipment.name)