ruff rule DJ

Co-authored-by: Bartuccio Antoine <klmp200@users.noreply.github.com>
This commit is contained in:
thomas girod
2024-06-27 15:48:07 +02:00
parent f941435232
commit 2ac578c3ad
20 changed files with 537 additions and 516 deletions

View File

@ -149,10 +149,10 @@ class ShoppingListItem(models.Model):
)
def __str__(self):
return "%s - %s" % (self.name, self.shopping_lists.first())
def can_be_viewed_by(self, user):
return user.is_in_group(pk=settings.SITH_GROUP_COUNTER_ADMIN_ID)
return f"{self.name} - {self.shopping_lists.first()}"
def get_absolute_url(self):
return reverse("stock:shoppinglist_list")
def can_be_viewed_by(self, user):
return user.is_in_group(pk=settings.SITH_GROUP_COUNTER_ADMIN_ID)