Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(InvoiceDetailView): correct attribute path for accessing customer… #24

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <radin@sageteam.org>", "Sepehr Akbarzadeh <sepehr@sageteam.org>" ]
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
Loading