diff --git a/setupdb.py b/setupdb.py index 881577d..b17124f 100644 --- a/setupdb.py +++ b/setupdb.py @@ -117,11 +117,11 @@ def seed(): stroke_production = Tag(name='Stroke Production', tag_category='poc', tag='Stroke_Production', device_id=1, description='Amount of fluid produced in the current stroke', data_type='REAL', change_threshold=0.005, min_expected=0.00, max_expected=0.01, units='BBL', guarantee_sec=3600) db.session.add(stroke_production) - num_tapers = BackupRestore(tag="Card_Current.Params.Num_Tapers") - taper_length = [BackupRestore(tag="Taper.Taper[{}].Setup.Length".format(i)) for i in range(1, 10)] - taper_diameter = [BackupRestore(tag="Taper.Taper[{}].Setup.Diameter".format(i)) for i in range(1, 10)] - taper_material = [BackupRestore(tag="Taper.Taper[{}].Setup.Material".format(i)) for i in range(1, 10)] - pump_diameter = BackupRestore(tag='UnitConfig.Pump_Diameter') + num_tapers = BackupRestore(tag="Card_Current.Params.Num_Tapers", device_id=1) + taper_length = [BackupRestore(tag="Taper.Taper[{}].Setup.Length".format(i), device_id=1) for i in range(1, 10)] + taper_diameter = [BackupRestore(tag="Taper.Taper[{}].Setup.Diameter".format(i), device_id=1) for i in range(1, 10)] + taper_material = [BackupRestore(tag="Taper.Taper[{}].Setup.Material".format(i), device_id=1) for i in range(1, 10)] + pump_diameter = BackupRestore(tag='UnitConfig.Pump_Diameter', device_id=1) db.session.add(num_tapers) for i in range(0, len(taper_length)): diff --git a/temp_seed_backup_restore.py b/temp_seed_backup_restore.py index 5d2c2ea..793ea86 100644 --- a/temp_seed_backup_restore.py +++ b/temp_seed_backup_restore.py @@ -6,11 +6,11 @@ from app import db # how else would it know what to create ? from app.datalogger.models import * -num_tapers = BackupRestore(tag="Card_Current.Params.Num_Tapers") -taper_length = [BackupRestore(tag="Taper.Taper[{}].Setup.Length".format(i)) for i in range(1, 10)] -taper_diameter = [BackupRestore(tag="Taper.Taper[{}].Setup.Diameter".format(i)) for i in range(1, 10)] -taper_material = [BackupRestore(tag="Taper.Taper[{}].Setup.Material".format(i)) for i in range(1, 10)] -pump_diameter = BackupRestore(tag='UnitConfig.Pump_Diameter') +num_tapers = BackupRestore(tag="Card_Current.Params.Num_Tapers", device_id=1) +taper_length = [BackupRestore(tag="Taper.Taper[{}].Setup.Length".format(i), device_id=1) for i in range(1, 10)] +taper_diameter = [BackupRestore(tag="Taper.Taper[{}].Setup.Diameter".format(i), device_id=1) for i in range(1, 10)] +taper_material = [BackupRestore(tag="Taper.Taper[{}].Setup.Material".format(i), device_id=1) for i in range(1, 10)] +pump_diameter = BackupRestore(tag='UnitConfig.Pump_Diameter', device_id=1) db.session.add(num_tapers) for i in range(0, len(taper_length)):