|
@@ -486,12 +486,6 @@ class DeviceManagement(View):
|
|
|
app_bundle_qs = app_bundle_qs.filter(app_bundle_id=app_bundle_id)
|
|
|
if lang:
|
|
|
app_bundle_qs = app_bundle_qs.filter(app_device_type__devicenamelanguage__lang=lang)
|
|
|
- if name:
|
|
|
- app_bundle_qs = app_bundle_qs.filter(name=name)
|
|
|
- if model:
|
|
|
- app_bundle_qs = app_bundle_qs.filter(model=model)
|
|
|
- if type:
|
|
|
- app_bundle_qs = app_bundle_qs.filter(type=type)
|
|
|
app_bundle_qs = app_bundle_qs.annotate(
|
|
|
model=F('app_device_type__model'), type=F('app_device_type__type'), icon=F('app_device_type__icon'),
|
|
|
lang=F('app_device_type__devicenamelanguage__lang'),
|
|
@@ -504,6 +498,12 @@ class DeviceManagement(View):
|
|
|
'app_device_type__devicenamelanguage__sort')
|
|
|
if not app_bundle_qs.exists():
|
|
|
return response.json(0)
|
|
|
+ if name:
|
|
|
+ app_bundle_qs = app_bundle_qs.filter(name=name)
|
|
|
+ if model:
|
|
|
+ app_bundle_qs = app_bundle_qs.filter(model=model)
|
|
|
+ if type:
|
|
|
+ app_bundle_qs = app_bundle_qs.filter(type=type)
|
|
|
total = app_bundle_qs.count()
|
|
|
app_bundle_qs = app_bundle_qs[(page - 1) * line:page * line]
|
|
|
app_device_type_list = []
|