Skip to content

Commit

Permalink
Fix has_location_data being True for manual activities
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Mar 13, 2022
1 parent a310a60 commit 8c1dc65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/strava_offline/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
'gear_id': activity['gear_id'],
'type': activity['type'],
'commute': activity['commute'],
'has_location_data': activity['start_latlng'] is not None,
'has_location_data': isinstance(activity['start_latlng'], list) and len(activity['start_latlng']) >= 2,
},
)

schema = sqlite.Schema(
# Version of database schema. Bump this whenever the schema changes,
# tables will be recreated using the stored json data and the new schema.
version=2,
version=3,

tables=[
table_bike,
Expand Down

0 comments on commit 8c1dc65

Please sign in to comment.