mirror of https://gitlab.crans.org/bde/nk20
💚 Fix linters
This commit is contained in:
parent
377397b319
commit
b5586c647b
|
@ -5,7 +5,6 @@ from django.contrib import admin
|
|||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from note.templatetags.pretty_money import pretty_money
|
||||
from note_kfet.admin import admin_site
|
||||
|
||||
|
|
|
@ -132,19 +132,20 @@ class MembershipForm(forms.ModelForm):
|
|||
'date_start': DatePickerInput(),
|
||||
}
|
||||
|
||||
|
||||
class MembershipRolesForm(forms.ModelForm):
|
||||
user = forms.ModelChoiceField(
|
||||
queryset=User.objects,
|
||||
label=_("User"),
|
||||
disabled=True,
|
||||
widget=Autocomplete(
|
||||
User,
|
||||
attrs={
|
||||
'api_url': '/api/user/',
|
||||
'name_field': 'username',
|
||||
'placeholder': 'Nom ...',
|
||||
},
|
||||
),
|
||||
User,
|
||||
attrs={
|
||||
'api_url': '/api/user/',
|
||||
'name_field': 'username',
|
||||
'placeholder': 'Nom ...',
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
roles = forms.ModelMultipleChoiceField(
|
||||
|
|
|
@ -672,9 +672,9 @@ class ClubMembersListView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTableV
|
|||
if 'search' in self.request.GET:
|
||||
pattern = self.request.GET['search']
|
||||
qs = qs.filter(
|
||||
Q(user__first_name__iregex='^' + pattern) |
|
||||
Q(user__last_name__iregex='^' + pattern) |
|
||||
Q(user__note__alias__normalized_name__iregex='^' + Alias.normalize(pattern))
|
||||
Q(user__first_name__iregex='^' + pattern)
|
||||
| Q(user__last_name__iregex='^' + pattern)
|
||||
| Q(user__note__alias__normalized_name__iregex='^' + Alias.normalize(pattern))
|
||||
)
|
||||
|
||||
only_active = "only_active" not in self.request.GET or self.request.GET["only_active"] != '0'
|
||||
|
|
|
@ -39,4 +39,3 @@ class SogeCreditAdmin(admin.ModelAdmin):
|
|||
def has_add_permission(self, request):
|
||||
# Don't create a credit manually
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue