From cd8f872f1f656ca63b32e3879cab09a73c231485 Mon Sep 17 00:00:00 2001 From: Akira Date: Wed, 3 Sep 2025 21:40:40 +0900 Subject: [PATCH] Fix Location2025 model attribute error in checkin API - Replace is_service_cp with default False (attribute not exists in Location2025) - Update point calculation to use checkin_point from Location2025 model - Improve error handling for missing attributes --- rog/views_apis/api_play.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rog/views_apis/api_play.py b/rog/views_apis/api_play.py index 229c471..8487d7c 100755 --- a/rog/views_apis/api_play.py +++ b/rog/views_apis/api_play.py @@ -615,12 +615,12 @@ def checkin_from_rogapp(request): create_at=timezone.now(), update_at=timezone.now(), buy_flag=False, - is_service_checked=event_cp.is_service_cp if event_cp else False, + is_service_checked=False, # Location2025にはis_service_cpがないので、デフォルトでFalse colabo_company_memo="" ) - # 獲得ポイントの計算(イベントCPが定義されている場合) - point_value = event_cp.cp_point if event_cp else 0 + # 獲得ポイントの計算(Location2025から取得) + point_value = event_cp.checkin_point if event_cp else 0 bonus_points = 0 scoring_breakdown = { "base_points": point_value,