From 5e1ca4cc5e0ee20f3616f8c3af8b2df513f126eb Mon Sep 17 00:00:00 2001
From: "E. Joshua Rigler" <erigler@usgs.gov>
Date: Tue, 22 Nov 2022 15:30:31 -0700
Subject: [PATCH] Small fix requiring a length-1 list to be indexed

Writing unit tests for Controller configurations is tricky, so I
didn't do it, and this tiny-but-impactful bug slipped in. I did
test this on the stagin server this time, and the processing pipe-
line should work after this is deployed.
---
 geomagio/algorithm/AverageAlgorithm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/geomagio/algorithm/AverageAlgorithm.py b/geomagio/algorithm/AverageAlgorithm.py
index 065e674a..15927447 100644
--- a/geomagio/algorithm/AverageAlgorithm.py
+++ b/geomagio/algorithm/AverageAlgorithm.py
@@ -265,7 +265,7 @@ class AverageAlgorithm(Algorithm):
         if self._inchannels:
             if len(self._inchannels) > 1:
                 raise AlgorithmException("Only 1 input channel can be specified")
-            self.inchannel = self._inchannels
+            self.inchannel = self._inchannels[0]
 
         self.observatories = arguments.observatory
         self.scales = arguments.average_observatory_scale
-- 
GitLab