Skip to content

Commit 8a56468

Browse files
committed
Update client setup to dynamically determine database name for Pasteur service
1 parent 9338d50 commit 8a56468

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

microSALT/utils/referencer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ def fetch_external(self, force=False):
152152
currver = self.db_access.get_version("profile_{}".format(organ))
153153
st_link = entry.find("./mlst/database/profiles/url").text
154154
service: str = get_service_by_url(st_link)
155-
self.set_client(service, database=organ)
155+
if service == "pasteur":
156+
database: str = organ.split("_")[0]
157+
self.set_client(service, database=database)
158+
else:
159+
self.set_client(service)
160+
156161
# Parse the database name and scheme ID
157162
try:
158163
parsed_data = self.client.parse_url(url=st_link)

0 commit comments

Comments
 (0)