ChoiceField comparison not working in template

Yes, it is part of my Django template.

Yes, I did that. I did include that in my question:

By text I mean that part of the template where it is written: DEBUG: {{ scope }} | {{ scope_id }} | {{ search_form.scope.value }}. It’s all rendered on the server. So if this results in DEBUG: Print | 1 | 1, why is {% if scope_id == search_form.scope.value %} then False?