From d9174ce171791e9f9280ca9099e9d4af7bd0797a Mon Sep 17 00:00:00 2001
From: Thorge Petersen <petersen@rz.uni-kiel.de>
Date: Tue, 24 Sep 2024 15:14:52 +0200
Subject: [PATCH] Fixed accessing extras attribute

---
 ckanext/odsh/templates/snippets/custom_form_fields.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ckanext/odsh/templates/snippets/custom_form_fields.html b/ckanext/odsh/templates/snippets/custom_form_fields.html
index e9983ec..0909644 100644
--- a/ckanext/odsh/templates/snippets/custom_form_fields.html
+++ b/ckanext/odsh/templates/snippets/custom_form_fields.html
@@ -27,7 +27,7 @@ Example:
   {% endfor %}
 
   {# Add a max of 3 empty columns #}
-  {% set total_extras = data.extras|count %}
+  {% set total_extras = extras|count %}
   {% if total_extras <= (custom_extras|count) %}{% set total_extras = (custom_extras|count) %}{% endif %}
   {% set empty_extras = (limit or 3) - total_extras %}
   {% if empty_extras <= 0 %}{% set empty_extras = 1 %}{% endif %}
-- 
GitLab