From 7864b06ddd0586b83584d7670f690bb9d3e1047e Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Thu, 17 Oct 2019 21:10:08 +0100 Subject: [PATCH] Fixed statuses other rhan "In service" not being hidden by default. --- assets/management/commands/generateSampleAssetsData.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/management/commands/generateSampleAssetsData.py b/assets/management/commands/generateSampleAssetsData.py index 2ef78ca8..00f85f3d 100644 --- a/assets/management/commands/generateSampleAssetsData.py +++ b/assets/management/commands/generateSampleAssetsData.py @@ -32,10 +32,10 @@ class Command(BaseCommand): models.AssetCategory.objects.create(name=cat) def create_statuses(self): - statuses = ['In Service', 'Lost', 'Binned', 'Sold', 'Broken'] + statuses = [('In Service', True), ('Lost', False), ('Binned', False), ('Sold', False), ('Broken', False)] for stat in statuses: - models.AssetStatus.objects.create(name=stat) + models.AssetStatus.objects.create(name=stat[0], should_show=stat[1]) def create_suppliers(self): suppliers = ["Acme, inc.", "Widget Corp", "123 Warehousing", "Demo Company", "Smith and Co.", "Foo Bars", "ABC Telecom", "Fake Brothers", "QWERTY Logistics", "Demo, inc.", "Sample Company", "Sample, inc", "Acme Corp", "Allied Biscuit", "Ankh-Sto Associates", "Extensive Enterprise", "Galaxy Corp", "Globo-Chem", "Mr. Sparkle", "Globex Corporation", "LexCorp", "LuthorCorp", "North Central Positronics", "Omni Consimer Products", "Praxis Corporation", "Sombra Corporation", "Sto Plains Holdings", "Tessier-Ashpool", "Wayne Enterprises", "Wentworth Industries", "ZiffCorp", "Bluth Company", "Strickland Propane", "Thatherton Fuels", "Three Waters", "Water and Power", "Western Gas & Electric", "Mammoth Pictures", "Mooby Corp", "Gringotts", "Thrift Bank", "Flowers By Irene", "The Legitimate Businessmens Club", "Osato Chemicals", "Transworld Consortium", "Universal Export", "United Fried Chicken", "Virtucon", "Kumatsu Motors", "Keedsler Motors", "Powell Motors", "Industrial Automation", "Sirius Cybernetics Corporation", "U.S. Robotics and Mechanical Men", "Colonial Movers", "Corellian Engineering Corporation", "Incom Corporation", "General Products", "Leeding Engines Ltd.", "Blammo", # noqa