|
@@ -760,15 +760,6 @@ class DeviceManagement(View):
|
|
|
try:
|
|
|
# 删除语言表
|
|
|
DeviceNameLanguage.objects.filter(app_device_type_id=app_device_type_id).delete()
|
|
|
- # 删除保存的图片
|
|
|
- app_device_type = AppDeviceType.objects.filter(id=app_device_type_id).first()
|
|
|
- if app_device_type:
|
|
|
- path = app_device_type.icon.split('/')[-1]
|
|
|
- pathV2 = app_device_type.iconV2.split('/')[-1]
|
|
|
- s3 = AmazonS3Util(AWS_ACCESS_KEY_ID[1], AWS_SECRET_ACCESS_KEY[1], AWS_SES_ACCESS_REGION)
|
|
|
- bucket_name = 'ansjerfilemanager'
|
|
|
- s3.delete_obj(bucket_name, f"app/device_type_images/{path}")
|
|
|
- s3.delete_obj(bucket_name, f"app/device_type_images/{pathV2}")
|
|
|
# 删除多对多关系
|
|
|
app_bundle_qs = AppBundle.objects.get(id=app_bundle_id)
|
|
|
app_bundle_qs.app_device_type.remove(app_device_type_id)
|