Changing the contract file name to the contract label. Updating label content with a dash

This commit is contained in:
2023-03-24 13:42:07 +01:00
parent b89d043880
commit f9867b3e2b
2 changed files with 2 additions and 2 deletions

View File

@@ -190,7 +190,7 @@ class Contract(CrudDocument):
for p in values['parties']:
contract_label = contract_label + f" - {p.entity.label}"
contract_label = contract_label + f" {values['date'].strftime('%m/%d/%Y')}"
contract_label = contract_label + f" - {values['date'].strftime('%m/%d/%Y')}"
return contract_label
return v

View File

@@ -130,7 +130,7 @@ async def create_pdf(contract_id: str) -> str:
return FileResponse(
contract_path,
media_type="application/pdf",
filename=contract.name)
filename=contract.label)
def retrieve_signature_png(filepath):