mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
fix: fix org map pin color on detail view
This commit is contained in:
@@ -7,6 +7,7 @@ from django.utils import timezone
|
|||||||
from django.views.generic import CreateView, DetailView, ListView, UpdateView
|
from django.views.generic import CreateView, DetailView, ListView, UpdateView
|
||||||
|
|
||||||
from people import forms, models
|
from people import forms, models
|
||||||
|
from .map import get_map_data
|
||||||
|
|
||||||
|
|
||||||
class OrganisationCreateView(LoginRequiredMixin, CreateView):
|
class OrganisationCreateView(LoginRequiredMixin, CreateView):
|
||||||
@@ -124,11 +125,7 @@ class OrganisationDetailView(LoginRequiredMixin, DetailView):
|
|||||||
|
|
||||||
answer_set = self.object.current_answers
|
answer_set = self.object.current_answers
|
||||||
context['answer_set'] = answer_set
|
context['answer_set'] = answer_set
|
||||||
context['map_markers'] = [{
|
context['map_markers'] = [get_map_data(self.object)]
|
||||||
'name': self.object.name,
|
|
||||||
'lat': getattr(answer_set, 'latitude', None),
|
|
||||||
'lng': getattr(answer_set, 'longitude', None),
|
|
||||||
}]
|
|
||||||
|
|
||||||
context['question_answers'] = {}
|
context['question_answers'] = {}
|
||||||
if answer_set is not None:
|
if answer_set is not None:
|
||||||
@@ -163,11 +160,7 @@ class OrganisationUpdateView(LoginRequiredMixin, UpdateView):
|
|||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
|
|
||||||
answerset = self.object.current_answers
|
answerset = self.object.current_answers
|
||||||
context['map_markers'] = [{
|
context['map_markers'] = [get_map_data(self.object)]
|
||||||
'name': self.object.name,
|
|
||||||
'lat': getattr(answerset, 'latitude', None),
|
|
||||||
'lng': getattr(answerset, 'longitude', None),
|
|
||||||
}]
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user