Skip to content

Commit

Permalink
Change datalink format attr to an HttpUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
stvoutsin committed Oct 9, 2024
1 parent abc1abc commit 5a099d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sia/models/data_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ButlerDataCollection:
label: str
defaultinstrument: str
default: bool = False
datalinkurl: str | None = None
datalinkurl: HttpUrl | None = None

def get_identifier(self) -> str:
"""Get the identifier for the data collection.
Expand Down Expand Up @@ -47,7 +47,7 @@ def exporter_config(self) -> ExporterConfig:
# We normally should find the datalink_url_fmt attribute
# If it doesn't exist this doesn't seem to be a critical issue
# so we suppress the AttributeError
exporter_config.dataset_types[
name
].datalink_url_fmt = self.datalinkurl
exporter_config.dataset_types[name].datalink_url_fmt = str(
self.datalinkurl
)
return exporter_config

0 comments on commit 5a099d8

Please sign in to comment.