import - first impression of quota dashboard by product

This commit is contained in:
2025-12-08 08:38:02 +03:30
parent 6491c53306
commit 6816c92661
3 changed files with 171 additions and 151 deletions

View File

@@ -79,7 +79,6 @@ class QuotaStatsValidator:
@staticmethod
def validate_distribution_delete(distribution):
# اگر already sold (been_sold > 0) نباید حذف شود
been_sold = getattr(distribution, "been_sold", None)
if been_sold and been_sold > 0:
raise ValidationError("Cannot delete distribution: it has sold items.")