{% load environment_config %} {% research_environment_config as environment_config %} {% if billing_accounts_list|length %} {# dictsort puts owned accounts last, so this is an owned account if the user has any. #} {% with owned_account=billing_accounts_list|dictsort:"is_owner"|last %}
{% endwith %}