From c978cd0bb64626067b278672368c7ea21c85df25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexa=20Valentov=C3=A1?= <git@imaniti.org>
Date: Tue, 8 Oct 2024 07:03:27 +0200
Subject: [PATCH] fix position embeds

---
 district/models.py                            | 4 +++-
 shared/templates/styleguide2/people_page.html | 6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/district/models.py b/district/models.py
index d4575155..d51f2fde 100644
--- a/district/models.py
+++ b/district/models.py
@@ -381,7 +381,9 @@ class PersonPageMixin(Page):
         return full_name
 
     @property
-    def position(self) -> None:
+    def position(self):
+        print(self.person.position)
+
         return self.person.position
 
     @property
diff --git a/shared/templates/styleguide2/people_page.html b/shared/templates/styleguide2/people_page.html
index 34244475..9137de64 100644
--- a/shared/templates/styleguide2/people_page.html
+++ b/shared/templates/styleguide2/people_page.html
@@ -53,9 +53,11 @@
                   <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')">
                     {% if block.value.person_list|length %}
                       {% for person_page in block.value.person_list %}
-                        {% image person_page.specific.get_profile_image fill-480x480 as profile_image %}
+                        {% with person_page.specific as person_page %}
+                          {% image person_page.get_profile_image fill-480x480 as profile_image %}
 
-                        {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %}
+                          {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %}
+                        {% endwith %}
                       {% endfor %}
                     {% endif %}
 
-- 
GitLab