Mobile API Changes for the pincode events

This commit is contained in:
Vivek P Prakash
2025-12-02 02:44:09 +05:30
parent d1c7042018
commit b2a2324c66
2 changed files with 4 additions and 2 deletions

View File

@@ -16,6 +16,5 @@ urlpatterns += [
path('events/type-list/', EventTypeListAPIView.as_view()),
path('events/pincode-events/', EventListAPI.as_view()),
path('events/event-details/', EventDetailAPI.as_view()),
path('events/event-images/', EventImagesListAPI.as_view()),
]

View File

@@ -87,7 +87,10 @@ class EventListAPI(APIView):
for e in events:
data_dict = model_to_dict(e)
thumb_img = EventImages.objects.get(id=e.id, is_primary=True)
print('*' * 10)
print(e.id)
print('*' * 10)
thumb_img = EventImages.objects.get(event=e.id, is_primary=True)
data_dict['thumb_img'] = request.build_absolute_uri(thumb_img.event_image.url)
event_list.append(data_dict)