From bfc3d87d73fbdf43b31a42991487222775a32fa0 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Sun, 2 Mar 2025 20:56:24 -0500 Subject: [PATCH] Gate db.add() around --dry-run to ensure other logic exercised --- bin/xmet-raob-ingest | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/xmet-raob-ingest b/bin/xmet-raob-ingest index 5ebc0a7..b7be59f 100755 --- a/bin/xmet-raob-ingest +++ b/bin/xmet-raob-ingest @@ -33,14 +33,14 @@ for path in getattr(args, 'raob-sounding-file'): if station is not None: sounding.station = station.code - if args.dry_run: - continue - - db.add(sounding) + if not args.dry_run: + db.add(sounding) for sample in sounding.samples: sample.sounding_id = sounding.id - db.add(sample) + + if not args.dry_run: + db.add(sample) if not args.dry_run: db.commit()