Compare commits
2 Commits
31d5ca5a01
...
fc34c37763
| Author | SHA1 | Date | |
|---|---|---|---|
| fc34c37763 | |||
| 64219a9a24 |
@@ -430,6 +430,14 @@ def confirm(request):
|
||||
if not ok:
|
||||
return JsonResponse({"status": "error", "message": "写入ES失败"}, status=500)
|
||||
|
||||
try:
|
||||
if image_rel and final_image_rel != image_rel:
|
||||
orig_abs = os.path.join(settings.MEDIA_ROOT, image_rel)
|
||||
if os.path.isfile(orig_abs):
|
||||
os.remove(orig_abs)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return JsonResponse({"status": "success", "message": "数据录入成功", "data": edited})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user