Gate db.add() around --dry-run to ensure other logic exercised
This commit is contained in:
parent
f902201702
commit
bfc3d87d73
1 changed files with 5 additions and 5 deletions
|
@ -33,13 +33,13 @@ for path in getattr(args, 'raob-sounding-file'):
|
||||||
if station is not None:
|
if station is not None:
|
||||||
sounding.station = station.code
|
sounding.station = station.code
|
||||||
|
|
||||||
if args.dry_run:
|
if not args.dry_run:
|
||||||
continue
|
|
||||||
|
|
||||||
db.add(sounding)
|
db.add(sounding)
|
||||||
|
|
||||||
for sample in sounding.samples:
|
for sample in sounding.samples:
|
||||||
sample.sounding_id = sounding.id
|
sample.sounding_id = sounding.id
|
||||||
|
|
||||||
|
if not args.dry_run:
|
||||||
db.add(sample)
|
db.add(sample)
|
||||||
|
|
||||||
if not args.dry_run:
|
if not args.dry_run:
|
||||||
|
|
Loading…
Add table
Reference in a new issue