Retry Location2025 search update 3
This commit is contained in:
@ -1055,7 +1055,8 @@ class Location2025Admin(LeafletGeoAdmin):
|
||||
]
|
||||
search_fields = [
|
||||
'cp_name', 'address', 'description', 'remark', 'tags',
|
||||
'sub_loc_id', 'subcategory', 'evaluation_value'
|
||||
'sub_loc_id', 'subcategory', 'evaluation_value',
|
||||
'event__event_name' # イベント名での検索を追加
|
||||
]
|
||||
readonly_fields = [
|
||||
'csv_source_file', 'csv_upload_date', 'csv_upload_user',
|
||||
|
||||
@ -762,10 +762,11 @@ def ExtentForSubPerf(request):
|
||||
sub_perf = JpnSubPerf.objects.get(id=sub_perf_id)
|
||||
ext = sub_perf.geom.extent
|
||||
return JsonResponse(ext, safe=False)
|
||||
except ObjectDoesNotExist:
|
||||
except JpnSubPerf.DoesNotExist:
|
||||
return JsonResponse({"error": "Specified sub_perf does not exist"}, status=404)
|
||||
except Exception as e:
|
||||
return JsonResponse({"error": "Error on ExtentForSubPerf : {e}"}, status=404)
|
||||
# テーブルが存在しない場合やその他のデータベースエラーをキャッチ
|
||||
return JsonResponse({"error": f"Service temporarily unavailable: {str(e)}"}, status=503)
|
||||
|
||||
|
||||
|
||||
@ -2268,7 +2269,7 @@ class ResendInvitationEmailView(APIView):
|
||||
send_verification_email(temp_user, verification_url)
|
||||
logger.info(f"招待メールを再送信しました。Email: {email}")
|
||||
return Response({"message": "招待メールを再送信しました。"}, status=status.HTTP_200_OK)
|
||||
except ObjectDoesNotExist:
|
||||
except TempUser.DoesNotExist:
|
||||
logger.warning(f"仮登録されていないメールアドレスに対して招待メールの再送信が試みられました。Email: {email}")
|
||||
return Response({"error": "指定されたメールアドレスは仮登録されていません。"}, status=status.HTTP_404_NOT_FOUND)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user