Twig\Error\RuntimeError

Line 46 of /home/clients/118fb10a9770004be21b58edaf37f4c7/sites/labrigeneve.ch/site/templates/spectacle.twig

Impossible to invoke a method ("url") on a null variable.

                        <section class="spectacle-content-section">
                            {% if pressLinks is not empty or pdfLinks is not empty or associatedArtists is not empty %}
                                <div class="artiste-block">
                                    <ul class="list-unstyled badge-list">
                                        {% for associatedArtist in associatedArtists %}
                                            {% set asAr = site.find("artistes").children().listed().findBy('uid', associatedArtist.associated_artist) %}
                                            <li><a class="badge badge-xl rounded-pill" href="{{ asAr.url() }}">{{ asAr.title }}</a></li>
                                        {% endfor %}
                                        {% for pressLink in pressLinks %}
                                            <li><a class="badge badge-xl rounded-pill" href="{{ pressLink.press_url() }}" target="_blank">{{ pressLink.press_text() }}</a></li>
                                        {% endfor %}
                                        {% for pdfLink in pdfLinks %}
                                            <li><a class="badge badge-xl rounded-pill" href="{{ pdfLink.pdf_content().toFile().url() }}" target="_blank">{{ pdfLink.pdf_text() }}</a></li>