use PEP 572

This commit is contained in:
2024-01-23 23:38:59 +00:00
parent 2eadadc452
commit 5f5414f29a
4 changed files with 34 additions and 47 deletions

View File

@@ -65,10 +65,7 @@ class BillCreateForm(forms.ModelForm):
}
def __init__(self, *args, **kwargs):
if "user" in kwargs:
user = kwargs.pop("user")
else:
user = None
user = kwargs.pop("user") if "user" in kwargs else None
super().__init__(*args, **kwargs) # to get the self.fields set