feat: automatic product archiving

This commit is contained in:
imperosol
2025-09-14 01:36:46 +02:00
parent 289ffe1109
commit dc4e01ff9c
6 changed files with 160 additions and 15 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):