fix: use .all instead of .exists() to respect prefetch cache in plant_detail

This commit is contained in:
Stephan Kerkman 2026-05-28 22:00:18 +02:00
parent dff1c88748
commit 66d26f5df7

View file

@ -77,7 +77,7 @@
{% include "plants/partials/photo_gallery.html" %} {% include "plants/partials/photo_gallery.html" %}
</div> </div>
{% if plant.card_photos.exists %} {% if plant.card_photos.all %}
<a href="{% url 'plant_card' plant.pk %}" class="btn btn-sm btn-outline-secondary mb-2">🪧 View plant card</a> <a href="{% url 'plant_card' plant.pk %}" class="btn btn-sm btn-outline-secondary mb-2">🪧 View plant card</a>
{% endif %} {% endif %}