From c6764189ecffd475983522c49f37e91c7981ec42 Mon Sep 17 00:00:00 2001
From: Alex Wernle <awernle@usgs.gov>
Date: Fri, 11 Oct 2024 16:37:21 -0600
Subject: [PATCH] Changed channels typehints, added channel to
 check_existing_metadata.

---
 geomagio/algorithm/MetadataAlgorithm.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/geomagio/algorithm/MetadataAlgorithm.py b/geomagio/algorithm/MetadataAlgorithm.py
index 7b85e82e..ef61e73f 100644
--- a/geomagio/algorithm/MetadataAlgorithm.py
+++ b/geomagio/algorithm/MetadataAlgorithm.py
@@ -2,6 +2,7 @@ from pydantic import BaseModel
 from obspy import UTCDateTime, Stream
 from datetime import timedelta
 from enum import Enum
+from typing import List
 
 from ..metadata.flag.Flag import Flag
 from ..metadata import Metadata, MetadataFactory, MetadataCategory
@@ -17,7 +18,7 @@ class DataFactory(str, Enum):
 class MetadataAlgorithm(BaseModel):
     factory: DataFactory = DataFactory.MINISEED
     observatory: str
-    channels: str
+    channels: List[str]
     metadata_token: str
     metadata_url: str
     type: str
@@ -84,6 +85,7 @@ class MetadataAlgorithm(BaseModel):
             station=metadata_obj.station,
             starttime=metadata_obj.starttime,
             endtime=metadata_obj.endtime,
+            channel=metadata_obj.channel,
         )
         metadata_factory = self._get_metadata_factory()
         prior_metadata = metadata_factory.get_metadata(query=query_metadata)
-- 
GitLab