Django queryset. How do i set a columns null value to bool false
i'm using a model based on a table view. When returned some column is off course null. But i want to assign all empty/null to bool value False.
Maybe there is another django way to assign all null/none to a bool False for a var used in filter
view.py
rows = Vbase.objects.all().values(*db_sel_columns)
rows_filter = baseFilter(request.GET, queryset=rows)
models.py
inRU = models.CharField(_("inRU"), blank=False, null=False, max_length=10)
filters.py
inRU = django_filters.CharFilter(lookup_expr='iregex', label='', widget=forms.Select(attrs={'onchange': 'this.form.submit();','color': 'navy','class': 'form-select'},choices=CHOICES_trueFalse))
When selecting in my template i can fine chose true, false, any. But i need to make all "none" to false.
can you help on this? Thanks