fix - is in sale licence for quota
This commit is contained in:
@@ -300,7 +300,7 @@ class QuotaViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, DynamicS
|
|||||||
quota = self.get_object()
|
quota = self.get_object()
|
||||||
|
|
||||||
# check quota expired time
|
# check quota expired time
|
||||||
if not quota.is_in_valid_time():
|
if not quota.is_in_sale_licence_time():
|
||||||
raise QuotaExpiredTimeException()
|
raise QuotaExpiredTimeException()
|
||||||
|
|
||||||
if quota.is_closed:
|
if quota.is_closed:
|
||||||
@@ -325,11 +325,11 @@ class QuotaViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, DynamicS
|
|||||||
quota = self.get_object()
|
quota = self.get_object()
|
||||||
|
|
||||||
# check quota expired time
|
# check quota expired time
|
||||||
if not quota.is_in_valid_time():
|
if not quota.is_in_sale_licence_time():
|
||||||
raise QuotaExpiredTimeException()
|
raise QuotaExpiredTimeException()
|
||||||
|
|
||||||
if not quota.is_closed:
|
if not quota.is_closed:
|
||||||
raise APIException("این سهمیه از قبل فعال است", status.HTTP_400_BAD_REQUEST)
|
raise APIException("این سهمیه از قبل فعال است", status.HTTP_400_BAD_REQUEST) # noqa
|
||||||
|
|
||||||
quota.is_closed = False
|
quota.is_closed = False
|
||||||
quota.save()
|
quota.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user