lint fixes

This commit is contained in:
Hugh Rundle 2021-10-05 21:29:33 +11:00
parent cdf7775e05
commit 6fde19e9b1
3 changed files with 3 additions and 3 deletions

View file

@ -141,7 +141,7 @@ class GroupMemberInvitation(models.Model):
# let the other members know about it
for membership in self.group.memberships.all():
member = membership.user
if member != self.user and member != self.group.user:
if member not in (self.user, self.group.user):
model.objects.create(
user=member,
related_user=self.user,

View file

@ -17,4 +17,4 @@
has left your group "<a href="{{ group_path }}">{{ group_name }}</a>"
{% endblocktrans %}
{% endblock %}
{% endblock %}

View file

@ -146,7 +146,7 @@ class Groups(View):
user = get_user_from_username(request.user, username)
paginated = Paginator(
models.Group.memberships.filter(user=user).order_by("-created_date"), PAGE_LENGTH
models.Group.memberships.filter(user=user).order_by("-created_date"), PAGE_LENGTH
)
data = {
"user": user,