Skip to content

Commit

Permalink
Merge pull request #24 from MohmdFo/main
Browse files Browse the repository at this point in the history
fix(InvoiceDetailView): correct attribute path for accessing customer…
  • Loading branch information
sepehr-akbarzadeh authored Oct 29, 2024
2 parents 76a0486 + 4ca9590 commit e756582
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,4 @@ media/

# Ignore all migrations files except __init__.py
bandit_report.txt
invoices/
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = [ "poetry-core" ]

[tool.poetry]
name = "django-sage-invoice"
version = "0.1.6"
version = "0.1.7"
description = "A project for invoice generation and NFC integration."
authors = [ "Radin Ghahremani <[email protected]>", "Sepehr Akbarzadeh <[email protected]>" ]
keywords = [ "django", "invoice", "sageteam", "django-packages" ]
Expand Down
4 changes: 2 additions & 2 deletions sage_invoice/views/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def get_context_data(self, **kwargs):
# Add additional context using the service class
context = super().get_context_data(**kwargs)
invoice = self.get_object()
context["customer_email"] = invoice.contacts.get("Contact Info").get(
context["customer_email"] = invoice.customer.contact.get("Contact Info").get(
"email", None
)
context["customer_phone"] = invoice.contacts.get("Contact Info").get(
context["customer_phone"] = invoice.customer.contact.get("Contact Info").get(
"phone", None
)
return context
Expand Down

0 comments on commit e756582

Please sign in to comment.