feat: automatic product archiving

This commit is contained in:
imperosol
2025-09-14 01:36:46 +02:00
parent b767079c5a
commit 5274f1f0f0
6 changed files with 164 additions and 22 deletions

View File

@@ -445,7 +445,8 @@ class Product(models.Model):
buying_groups = list(self.buying_groups.all())
if not buying_groups:
return True
return any(user.is_in_group(pk=group.id) for group in buying_groups)
res = any(user.is_in_group(pk=group.id) for group in buying_groups)
return res
@property
def profit(self):