Update postmgiration script for equipments

This commit is contained in:
Keannu Bernasol 2023-12-27 16:31:37 +08:00
parent 6d25157c5f
commit 02df5b5ea9

View file

@ -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)