From 311c02d554f23ff2004d511446f2a0de1e44e8ea Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Fri, 16 Dec 2022 14:14:43 +0000 Subject: [PATCH] Fix associated events being discarded on subhire edit --- RIGS/templates/event_detail.html | 2 +- RIGS/templates/partials/event_table.html | 2 +- RIGS/templates/subhire_form.html | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RIGS/templates/event_detail.html b/RIGS/templates/event_detail.html index 4b7d7aa2..096fece1 100644 --- a/RIGS/templates/event_detail.html +++ b/RIGS/templates/event_detail.html @@ -48,7 +48,7 @@

Event Items

{% include 'partials/item_table.html' %} - {% if event.subhire_set %} + {% if event.subhire_set.count > 0 %}

Associated Subhires

{% with event.subhire_set.all as events %} {% include 'partials/event_table.html' %} diff --git a/RIGS/templates/partials/event_table.html b/RIGS/templates/partials/event_table.html index efdd50b7..9ff0787e 100644 --- a/RIGS/templates/partials/event_table.html +++ b/RIGS/templates/partials/event_table.html @@ -42,7 +42,7 @@

- + {{ event.name }} {% if event.venue %} diff --git a/RIGS/templates/subhire_form.html b/RIGS/templates/subhire_form.html index f75fe350..87cfc3be 100644 --- a/RIGS/templates/subhire_form.html +++ b/RIGS/templates/subhire_form.html @@ -98,7 +98,13 @@
Associated Event(s)
- +