Skip to content

Commit 9647b14

Browse files
#P04.2. Only display Hackathons where the org is CodeInstitute or where the user.org == hackathon.org (#108)
1 parent 24752b7 commit 9647b14

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

hackathon/templates/hackathon/hackathon_list.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
{% if hackathons %}
66
<h2 class="p-orange text-center mb-4">Hackathons</h2>
77
{% for hackathon in hackathons %}
8-
{% if hackathon.status == 'published' or user == hackathon.created_by %}
9-
{% if not hackathon.status == 'deleted' %}
10-
{% include 'hackathon/includes/hackathon_card.html' %}
11-
<hr>
8+
{% if hackathon.organisation == 'Code Institute' or hackathon.organisation == user.organisation %}
9+
{% if hackathon.status == 'published' or user == hackathon.created_by %}
10+
{% if not hackathon.status == 'deleted' %}
11+
{% include 'hackathon/includes/hackathon_card.html' %}
12+
<hr>
13+
{% endif %}
14+
{% endif %}
1215
{% endif %}
13-
{% endif %}
1416
{% endfor %}
1517
{% else %}
1618
<h2 class="text-center">There aren't any Hackathons at the moment!</h2>

0 commit comments

Comments
 (0)