feat: Use slug to get specialization

This commit is contained in:
2025-09-06 15:35:17 +02:00
parent b4be21bf45
commit ebaa477cff
2 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ urlpatterns = [
path("tierschutzorganisationen/", views.list_rescue_organizations, name="rescue-organizations"),
path("tierschutzorganisationen/<int:rescue_organization_id>/", views.detail_view_rescue_organization,
name="rescue-organization-detail"),
path("tierschutzorganisationen/spezialisierung/<int:species_id>", views.specialized_rescues,
path("tierschutzorganisationen/spezialisierung/<slug:species_slug>", views.specialized_rescues,
name="specialized-rescue-organizations"),
# ex: /search/

View File

@@ -804,8 +804,8 @@ def list_rescue_organizations(request, species=None, template='fellchensammlung/
return render(request, template, context=context)
def specialized_rescues(request, species_id):
species = get_object_or_404(Species, pk=species_id)
def specialized_rescues(request, species_slug):
species = get_object_or_404(Species, slug=species_slug)
return list_rescue_organizations(request, species)