diff --git a/api/db.py b/api/db.py index a308c68..0a92cdc 100644 --- a/api/db.py +++ b/api/db.py @@ -90,6 +90,7 @@ def get_image_pkg(self): Notably missing from this is the entire fits header, for smaller payload sizes. """ + header_dictionary = json.loads(self.header) if self.header is not None else None package = { "image_id": self.image_id, @@ -114,7 +115,8 @@ def get_image_pkg(self): "username": self.username, "user_id": self.user_id, - "header": json.loads(self.header) if self.header is not None else self.header + "SMARTSTK": header_dictionary.get("SMARTSTK", '') if header_dictionary is not None else '', + "SSTKNUM": header_dictionary.get("SSTKNUM", '') if header_dictionary is not None else '' } # Convert to timestamp in milliseconds