mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-02 13:22:17 +00:00
Fixed pep8
This commit is contained in:
@@ -68,7 +68,7 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
def create_cables(self):
|
def create_cables(self):
|
||||||
asset_description = ['The worm', 'Harting without a cap', 'Heavy cable', 'Extension lead', 'IEC cable that we should remember to prep']
|
asset_description = ['The worm', 'Harting without a cap', 'Heavy cable', 'Extension lead', 'IEC cable that we should remember to prep']
|
||||||
asset_prefixes = ["C","C4P","CBNC", "CDMX", "CDV", "CRCD", "CSOCA", "CXLR"]
|
asset_prefixes = ["C", "C4P", "CBNC", "CDMX", "CDV", "CRCD", "CSOCA", "CXLR"]
|
||||||
|
|
||||||
csas = [0.75, 1.00, 1.25, 2.5, 4]
|
csas = [0.75, 1.00, 1.25, 2.5, 4]
|
||||||
lengths = [1, 2, 5, 10, 15, 20, 25, 30, 50, 100]
|
lengths = [1, 2, 5, 10, 15, 20, 25, 30, 50, 100]
|
||||||
@@ -96,16 +96,15 @@ class Command(BaseCommand):
|
|||||||
cores=random.choice(circuits)
|
cores=random.choice(circuits)
|
||||||
)
|
)
|
||||||
|
|
||||||
if i % 5 == 0:
|
prefix = random.choice(asset_prefixes)
|
||||||
prefix = random.choice(asset_prefixes)
|
asset.asset_id = prefix + str(models.Asset.get_available_asset_id(wanted_prefix=prefix))
|
||||||
asset.asset_id = prefix + str(models.Asset.get_available_asset_id(wanted_prefix=prefix))
|
|
||||||
|
|
||||||
if i % 4 == 0:
|
if i % 4 == 0:
|
||||||
asset.parent = models.Asset.objects.order_by('?').first()
|
asset.parent = models.Asset.objects.order_by('?').first()
|
||||||
|
|
||||||
if i % 3 == 0:
|
if i % 3 == 0:
|
||||||
asset.purchased_from = random.choice(suppliers)
|
asset.purchased_from = random.choice(suppliers)
|
||||||
|
|
||||||
asset.clean()
|
asset.clean()
|
||||||
asset.save()
|
asset.save()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user