mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-07-02 15:08:22 +00:00
fix: check asset count by Asset not self.model
This commit is contained in:
@@ -169,7 +169,7 @@ class BaseAssetViewSet(OrgBulkModelViewSet):
|
||||
return Response({'error': error}, status=400)
|
||||
|
||||
with tmp_to_root_org():
|
||||
asset_count = self.model.objects.order_by().count()
|
||||
asset_count = Asset.objects.order_by().count()
|
||||
|
||||
if not settings.XPACK_LICENSE_IS_VALID and asset_count >= 5000:
|
||||
error = _('The number of assets exceeds the limit of 5000')
|
||||
|
||||
Reference in New Issue
Block a user