auto-claude: subtask-3-1 - Update _check_hours() method to read from google_opening_hours
Changed _check_hours() in GBP Audit Service to read opening hours from google_opening_hours field instead of google_business_status. The method now properly returns the actual hours value when available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
aacf2cf54b
commit
d84588c46b
@ -3,23 +3,23 @@
|
|||||||
"spec": "008-dziala-pobieranie-danych-z-gbp-ale-czesciowo-nadal",
|
"spec": "008-dziala-pobieranie-danych-z-gbp-ale-czesciowo-nadal",
|
||||||
"state": "building",
|
"state": "building",
|
||||||
"subtasks": {
|
"subtasks": {
|
||||||
"completed": 2,
|
"completed": 4,
|
||||||
"total": 13,
|
"total": 13,
|
||||||
"in_progress": 1,
|
"in_progress": 1,
|
||||||
"failed": 0
|
"failed": 0
|
||||||
},
|
},
|
||||||
"phase": {
|
"phase": {
|
||||||
"current": "Google Places API Update",
|
"current": "GBP Audit Service Update",
|
||||||
"id": null,
|
"id": null,
|
||||||
"total": 3
|
"total": 2
|
||||||
},
|
},
|
||||||
"workers": {
|
"workers": {
|
||||||
"active": 0,
|
"active": 0,
|
||||||
"max": 1
|
"max": 1
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
"number": 3,
|
"number": 5,
|
||||||
"started_at": "2026-01-08T22:56:12.625328"
|
"started_at": "2026-01-08T22:56:12.625328"
|
||||||
},
|
},
|
||||||
"last_update": "2026-01-08T22:58:22.515043"
|
"last_update": "2026-01-08T23:00:49.446090"
|
||||||
}
|
}
|
||||||
@ -421,21 +421,12 @@ class GBPAuditService:
|
|||||||
"""Check opening hours presence"""
|
"""Check opening hours presence"""
|
||||||
max_score = FIELD_WEIGHTS['hours']
|
max_score = FIELD_WEIGHTS['hours']
|
||||||
|
|
||||||
# Hours are typically not stored in Company model directly
|
# Check if we have opening hours from Google Business Profile
|
||||||
# We would need to check Google Business data or a dedicated field
|
if analysis and analysis.google_opening_hours:
|
||||||
# For now, we check if there's any indicator of hours being set
|
|
||||||
|
|
||||||
# This is a placeholder - in production, you'd check:
|
|
||||||
# 1. Google Business API data
|
|
||||||
# 2. Scraped hours from website
|
|
||||||
# 3. Dedicated hours field in database
|
|
||||||
|
|
||||||
# Check if we have any business status from Google
|
|
||||||
if analysis and analysis.google_business_status:
|
|
||||||
return FieldStatus(
|
return FieldStatus(
|
||||||
field_name='hours',
|
field_name='hours',
|
||||||
status='complete',
|
status='complete',
|
||||||
value='Godziny dostępne w Google',
|
value=analysis.google_opening_hours,
|
||||||
score=max_score,
|
score=max_score,
|
||||||
max_score=max_score
|
max_score=max_score
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user