From d8772dc36406c9a2431ce1f475b66f0d28bb7e98 Mon Sep 17 00:00:00 2001 From: Patrick Huck Date: Fri, 13 Dec 2024 16:05:32 -0800 Subject: [PATCH] fix suffix for root level endpoints --- mp_api/client/core/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mp_api/client/core/client.py b/mp_api/client/core/client.py index f8cff821..822d25a3 100644 --- a/mp_api/client/core/client.py +++ b/mp_api/client/core/client.py @@ -468,7 +468,9 @@ def _query_resource( if query_s3: db_version = self.db_version.replace(".", "-") - if self.suffix == "molecules/summary": + if "/" not in self.suffix: + suffix = self.suffix + elif self.suffix == "molecules/summary": suffix = "molecules" else: infix, suffix = self.suffix.split("/", 1)