Fixed pep8

This commit is contained in:
Matthew Smith
2019-12-05 16:50:23 +00:00
parent 1f0dc9f1ae
commit 5a081a97c4

View File

@@ -68,7 +68,7 @@ class Command(BaseCommand):
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_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]
lengths = [1, 2, 5, 10, 15, 20, 25, 30, 50, 100]
@@ -96,16 +96,15 @@ class Command(BaseCommand):
cores=random.choice(circuits)
)
if i % 5 == 0:
prefix = random.choice(asset_prefixes)
asset.asset_id = prefix + str(models.Asset.get_available_asset_id(wanted_prefix=prefix))
prefix = random.choice(asset_prefixes)
asset.asset_id = prefix + str(models.Asset.get_available_asset_id(wanted_prefix=prefix))
if i % 4 == 0:
asset.parent = models.Asset.objects.order_by('?').first()
if i % 3 == 0:
asset.purchased_from = random.choice(suppliers)
asset.clean()
asset.save()