Skip to content
Snippets Groups Projects
Commit 1808e19c authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix registration detail view for registrations without invoices

parent 11354c27
No related branches found
No related tags found
1 merge request!78Resolve "Rewrite registration wizard"
Pipeline #195984 passed
...@@ -238,6 +238,7 @@ ...@@ -238,6 +238,7 @@
</div> </div>
</div> </div>
{% if invoice %}
<h5>{% trans "Invoice details" %}</h5> <h5>{% trans "Invoice details" %}</h5>
<div class="col s12 m8"> <div class="col s12 m8">
<div class="row"> <div class="row">
...@@ -318,6 +319,7 @@ ...@@ -318,6 +319,7 @@
</div> </div>
</div> </div>
</div> </div>
{% endif %}
{% if registration.person.guardians.all %} {% if registration.person.guardians.all %}
<h5>{% trans "Guardians / Parents "%}</h5> <h5>{% trans "Guardians / Parents "%}</h5>
......
...@@ -219,8 +219,9 @@ class EventRegistrationDetailView(PermissionRequiredMixin, DetailView): ...@@ -219,8 +219,9 @@ class EventRegistrationDetailView(PermissionRequiredMixin, DetailView):
def get_context_data(self, *args, **kwargs): def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs) context = super().get_context_data(*args, **kwargs)
invoice = self.get_object().get_invoice() if self.get_object().event.max_cost is None or self.get_object().event.max_cost > 0:
context["invoice"] = invoice invoice = self.get_object().get_invoice()
context["invoice"] = invoice
return context return context
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment