Can't loop over MetaobjectListDrop

This was working fine an hour or so ago before I made some changes to the metaobject fields.

The customer has a metaobject list reference metafield which as values in it:

I’m outputing it in liquid along with some debug output:

tests: {{  customer.metafields.custom.tests }}
tests drop: {{  customer.metafields.custom.tests.value }}

<div class="tests">
  {% for test in customer.metafields.custom.tests.value %}
    <div class="test p-6">
      <div class="pet-name">{{ test.display_name }} - {{ test.type }}</div>
      <div class="results-shared">Results Shared: {{ test.results_shared_at | date: '%B %d, %Y' }}</div>
      <div class="test-number mb-2 text-gray-500">#{{ test.airtable_id }}</div>
      <div class="download">
        <a class="chButton chButton-UP" href="{{ test.pdf_url }}">Download Results</a>
      </div>
    </div>
  {% endfor %}
</div>

It’s outputing the raw metaobject id values and the .value is a MetaobjectListDrop as expected, but it never gets inside the loop at all:

It’s because the metaobjects are in draft status which is the default when creating a metaobject over graphql.

1 Like