mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 17:50:16 -04:00
chore: fix linter
This commit is contained in:
parent
5b2cd98ae5
commit
07648a5a37
|
@ -45,8 +45,8 @@ def accept_tos_view(request: HttpRequest) -> HttpResponse:
|
||||||
form = TOSForm(request.POST)
|
form = TOSForm(request.POST)
|
||||||
|
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
accept_tos: bool = form.cleaned_data.get("accept_tos")
|
accept_tos = form.cleaned_data.get("accept_tos") # type: ignore
|
||||||
request.user.accepted_terms = accept_tos
|
request.user.accepted_terms = accept_tos # type: ignore
|
||||||
request.user.set_password(form.cleaned_data.get("password"))
|
request.user.set_password(form.cleaned_data.get("password"))
|
||||||
request.user.save()
|
request.user.save()
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,9 @@ class StudentDestinationListView(
|
||||||
search_query = self.request.GET.get("q", None)
|
search_query = self.request.GET.get("q", None)
|
||||||
if search_query is not None:
|
if search_query is not None:
|
||||||
queryset = queryset.filter(
|
queryset = queryset.filter(
|
||||||
Q(first_name__icontains=search_query)
|
Q( # pylint: disable=unsupported-binary-operation
|
||||||
|
first_name__icontains=search_query
|
||||||
|
)
|
||||||
| Q(last_name__icontains=search_query)
|
| Q(last_name__icontains=search_query)
|
||||||
| Q(nickname__icontains=search_query)
|
| Q(nickname__icontains=search_query)
|
||||||
| Q(biography__icontains=search_query)
|
| Q(biography__icontains=search_query)
|
||||||
|
|
|
@ -19,12 +19,12 @@ class ProfilePublishForm(forms.ModelForm):
|
||||||
|
|
||||||
self.helper.add_input(Submit("submit", "Submit"))
|
self.helper.add_input(Submit("submit", "Submit"))
|
||||||
|
|
||||||
self.fields["attending_decision"].queryset = Decision.objects.filter(
|
self.fields["attending_decision"].queryset = Decision.objects.filter( # type: ignore
|
||||||
user=self.instance, admission_status__contains="ADMIT"
|
user=self.instance, admission_status__contains="ADMIT"
|
||||||
)
|
)
|
||||||
|
|
||||||
def clean(self) -> Dict[str, Any]:
|
def clean(self) -> Dict[str, Any]:
|
||||||
data = self.data.copy()
|
data = self.data.copy() # type: ignore
|
||||||
|
|
||||||
# Remove carriage returns from biography
|
# Remove carriage returns from biography
|
||||||
if data.get("biography"):
|
if data.get("biography"):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user