From 2816d528a09842fb3880919735b4951520a414a4 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 13 May 2019 09:53:01 -0500 Subject: [PATCH] Fixed attraction missing in loc_child_obj --- GeoffreyApp/models.py | 2 ++ GeoffreyApp/urls.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GeoffreyApp/models.py b/GeoffreyApp/models.py index 88378be..b80fff9 100644 --- a/GeoffreyApp/models.py +++ b/GeoffreyApp/models.py @@ -226,6 +226,8 @@ class Location(models.Model): return self.publicfarm elif hasattr(self, "market"): return self.market + elif hasattr(self, "attraction"): + return self.attraction else: return self diff --git a/GeoffreyApp/urls.py b/GeoffreyApp/urls.py index 7b2720b..4042bd0 100644 --- a/GeoffreyApp/urls.py +++ b/GeoffreyApp/urls.py @@ -23,7 +23,7 @@ urlpatterns = [ name='GeoffreyPointOfInterestInfo'), url(r'^attraction/$', views.AttractionList.as_view(), name='GeoffreyAttraction'), url(r'^attraction/(?P[0-9]{1,9})/$', views.AttractionInfo.as_view(), - name='AttractionInfo'), + name='GeoffreyAttractionInfo'), path('api/', include('GeoffreyApp.api.urls')), ]