THIS should solve the naming problem

new class for the Proposals, only outputs their names
if name contains "Proposal ", that gets cropped out
if no proposal is specified the name of the sample shall not include one
This commit is contained in:
2026-05-12 22:59:19 +02:00
parent 2bbab96ca7
commit 7e808509cc
2 changed files with 35 additions and 2 deletions

View File

@@ -331,6 +331,14 @@ class Target(Material):
self.description = material_data.get("body") or ""
class Proposal:
def __init__(self, proposal_data):
if "Proposal " in proposal_data["title"]:
self.name = proposal_data["title"].replace("Proposal ", "")
else:
self.name = proposal_data["title"]
if __name__ == "__main__":
# head = APIHandler("MyApiKey-123456789abcdef")
# print(f"Example header:\n\t{head.header}\n")