Skip to content

Commit

Permalink
fix a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sobri909 committed Dec 14, 2023
1 parent b51113b commit 9744eb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Arc Mini/Models/Place/PlaceCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ class PlaceCache {

let unusedPlaces = store.places(where: "visitsCount = 0 AND needsUpdate != 1")
for place in unusedPlaces {
RecordingManager.store.connectToDatabase()
let visitsCount = store.countItems(where: "placeId = ? AND deleted = 0 AND disabled = 0", arguments: [place.placeId.uuidString])
guard visitsCount == 0 else { place.setNeedsUpdate(); continue }
do {
Expand Down

0 comments on commit 9744eb5

Please sign in to comment.