const childCheckboxes = document.querySelectorAll('input[type="checkbox"][data-parent="${parentId}"]');
<!-- для organ_set_sort-->
<label><input type="checkbox" name={{o}} value={{o}} id="{{o}}" onchange="toggleChildren('{{o}}')">{{o}}</label>
<!-- для tissue_set_sort-->
<label><input type="checkbox" name={{t.0}} value={{t.0}} data-parent="{{t.1}}" onchange="checkParent('{{t.1}}')">{{t.0}}</label>
const childCheckboxes=document.querySelectorAll('input[type="checkbox"][data-parent=parentId]');
{% for t in tissue_set_sort %}
<!--o = o.filter(question = qu.id) -->
<label><input type="checkbox" name={{t.0}} value={{t.0}} data-parent={{t.1}} onchange="checkParent({{t.1}})">{{t.0}}</label>
<br>
<br>
{% endfor %}
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': 'input[type="checkbox"][data-parent=`${parentId}`]' is not a valid selector.