fix - edit quota -> distributed > weight *
This commit is contained in:
@@ -14,7 +14,7 @@ class QuotaSerializer(serializers.ModelSerializer):
|
||||
def validate(self, attrs):
|
||||
weight = attrs['quota_weight']
|
||||
if self.instance:
|
||||
if self.instance.quota_distributed < weight:
|
||||
if self.instance.quota_distributed > weight:
|
||||
raise QuotaException(
|
||||
"وزن سهمیه نمیتواند کمتر از وزن توزیع شده باشد", # noqa
|
||||
status.HTTP_403_FORBIDDEN
|
||||
|
||||
Reference in New Issue
Block a user