Liquid error - events

I’ve got an error on this page https://tasbus.com.au/vehicle-inspections/booking. This lists a custom module of location links which when clicked goes to the events listed on a calendar for that location.

The liquid checks if the custom module location ID is equal to the event location then it calculates the number of available events for that location and displays it in brackets after the location name.

This is working for some locations but not others. Odd. Under the South heading, Glenorchy and Derwent Park display correctly but Sorell has events linked but they show 0 in the list.

I’ve checked the location ID and event location ID and they match for sorell items. I can’t find whats causing the issue.

This is my liquid code.

{% component source: "Event", limit: "1000", object: "collection", collectionVariable: "eventlist", type: "module" %}
 {% component source: "Inspection Stations", layout: "List", filterBy: "ItemCategories", filterValue: "Vehicle Inspections/South", sortBy: "name", sortOrder: "ASC", limit: "500", emptyMessage: "oops... nothing to display", object: "collection", collectionVariable: "location", type: "module" %}
<h2>South</h2>
<ul class="list-unstyled">
        {% for i in location.items %}
        <li><a href="/{{i['urlslug']}}">{{i['name']}}</a>
        
        {% assign count = 0 %}
        
        {% for e in eventlist.items %}
            {% if e.location2 == i.id %}
             {% assign count = count | plus: e.capacity | minus : e.allocation %}
            
            {% endif %}
            {% endfor %}
            ({{count}}) 
            {% endfor %}
          
           </li>
        </ul>

Can anyone offer any suggestions?

Don’t worry - looks like its an issue with uploading the events. If I manually add the linking field it reads it. I’ll keep looking.