larxius commited on
Commit
0f98d89
·
verified ·
1 Parent(s): 3bc85d1

Update backend/routes.py

Browse files
Files changed (1) hide show
  1. backend/routes.py +3 -24
backend/routes.py CHANGED
@@ -664,15 +664,7 @@ def manage_org_quotas(current_user, org_id):
664
  'used_count': 0
665
  })
666
 
667
- # Also include any other quotas that might exist
668
- for q in quotas:
669
- if q.scan_type not in default_types:
670
- result.append({
671
- 'scan_type': q.scan_type,
672
- 'allocated_count': q.allocated_count,
673
- 'used_count': q.used_count
674
- })
675
-
676
  return jsonify({'quotas': result}), 200
677
 
678
  if request.method == 'POST':
@@ -736,14 +728,7 @@ def manage_organizations(current_user):
736
  'used_count': 0
737
  })
738
 
739
- # also include any non-default ones
740
- for stype, q in q_dict.items():
741
- if stype not in default_types:
742
- org_quotas.append({
743
- 'scan_type': stype,
744
- 'allocated_count': q.allocated_count,
745
- 'used_count': q.used_count
746
- })
747
 
748
  org_list.append({
749
  'id': o.id,
@@ -1194,13 +1179,7 @@ def get_global_stats(current_user):
1194
  'allocated_count': 0,
1195
  'used_count': 0
1196
  })
1197
- for stype, q in q_dict.items():
1198
- if stype not in default_types:
1199
- org_quotas.append({
1200
- 'scan_type': stype,
1201
- 'allocated_count': q.allocated_count,
1202
- 'used_count': q.used_count
1203
- })
1204
 
1205
  orgs_data.append({
1206
  'id': org.id,
 
664
  'used_count': 0
665
  })
666
 
667
+ # Return only standard scan types (Quick, Advanced, Deep)
 
 
 
 
 
 
 
 
668
  return jsonify({'quotas': result}), 200
669
 
670
  if request.method == 'POST':
 
728
  'used_count': 0
729
  })
730
 
731
+
 
 
 
 
 
 
 
732
 
733
  org_list.append({
734
  'id': o.id,
 
1179
  'allocated_count': 0,
1180
  'used_count': 0
1181
  })
1182
+
 
 
 
 
 
 
1183
 
1184
  orgs_data.append({
1185
  'id': org.id,