Ignore pylint complaints about argument counts to form saves

This commit is contained in:
Mouse Reeve 2022-09-19 13:23:18 -07:00
parent 35aebacf70
commit 7d61cb55bc
2 changed files with 2 additions and 0 deletions

View file

@ -141,6 +141,7 @@ class IntervalScheduleForm(StyledForm):
"period": forms.Select(attrs={"aria-describedby": "desc_period"}),
}
# pylint: disable=arguments-differ
def save(self, request, *args, **kwargs):
"""This is an outside model so the perms check works differently"""
if not request.user.has_perm("bookwyrm.moderate_user"):

View file

@ -29,6 +29,7 @@ class StyledForm(ModelForm):
class CustomForm(StyledForm):
"""Check permissions on save"""
# pylint: disable=arguments-differ
def save(self, request, *args, **kwargs):
"""Save and check perms"""
self.instance.raise_not_editable(request.user)