Changing the contract file name to the contract label. Updating label content with a dash
This commit is contained in:
@@ -190,7 +190,7 @@ class Contract(CrudDocument):
|
|||||||
for p in values['parties']:
|
for p in values['parties']:
|
||||||
contract_label = contract_label + f" - {p.entity.label}"
|
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 contract_label
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ async def create_pdf(contract_id: str) -> str:
|
|||||||
return FileResponse(
|
return FileResponse(
|
||||||
contract_path,
|
contract_path,
|
||||||
media_type="application/pdf",
|
media_type="application/pdf",
|
||||||
filename=contract.name)
|
filename=contract.label)
|
||||||
|
|
||||||
|
|
||||||
def retrieve_signature_png(filepath):
|
def retrieve_signature_png(filepath):
|
||||||
|
|||||||
Reference in New Issue
Block a user