Fixes for ruff check in fields.py

This commit is contained in:
tcely 2025-05-17 10:22:16 -04:00 committed by GitHub
parent 60579ab883
commit 087e2f2e5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,7 +63,7 @@ class CommaSepChoiceField(models.CharField):
def __init__(self, *args, separator=",", possible_choices=(("","")), all_choice="", all_label="All", allow_all=False, **kwargs): def __init__(self, *args, separator=",", possible_choices=(("","")), all_choice="", all_label="All", allow_all=False, **kwargs):
kwargs.setdefault('max_length', 128) kwargs.setdefault('max_length', 128)
self.separator = str(separator) self.separator = str(separator)
self.possible_choices = possible_choices or choices self.possible_choices = possible_choices or kwargs['choices']
self.selected_choices = list() self.selected_choices = list()
self.allow_all = allow_all self.allow_all = allow_all
self.all_label = all_label self.all_label = all_label