From e0924bbd1c0f22f8037de1ba5a5df78e441f08cf Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 30 Jul 2026 15:45:38 -0700 Subject: [PATCH] Simplify Author List Update according to https://github.com/pals-project/pals/pull/286 --- src/pals/PALS.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/pals/PALS.py b/src/pals/PALS.py index 9354219..1dbd5b8 100644 --- a/src/pals/PALS.py +++ b/src/pals/PALS.py @@ -88,15 +88,6 @@ def unpack_json_structure(cls, data): data = inner data = dict(data) - # Authors are written as one-key `author:` dicts; unwrap them. - if isinstance(data.get("authors"), list): - data["authors"] = [ - entry["author"] - if isinstance(entry, dict) and set(entry) == {"author"} - else entry - for entry in data["authors"] - ] - # Unpack each facility element's name; facility is optional. if data.get("facility") is not None: if not isinstance(data["facility"], list): @@ -113,13 +104,6 @@ def model_dump(self, *args, **kwargs): # Keep `version` in the output even when unset. data = {"version": self.version, **data} - # Restore the one-key `author:` form of each authors entry. - if self.authors is not None: - data["authors"] = [ - {"author": author.model_dump(*args, **kwargs)} - for author in self.authors - ] - # Reformat facility elements into their one-key named form. if self.facility is not None: data["facility"] = [elem.model_dump(**kwargs) for elem in self.facility]