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
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user