Skip to content

Commit

Permalink
Merge pull request #79 from Woosmap/fix/idStore
Browse files Browse the repository at this point in the history
protect data for airship when no POI found with a idStore
  • Loading branch information
Llumbroso committed Apr 19, 2022
2 parents bd8e578 + f9511d9 commit f4124a8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ class PositionsManager(val context: Context, private val db: WoosmapDb) {
data.put("longitude", regionLog.lng)
} else {
val poi = this.db.poIsDAO.getPOIbyStoreId(regionLog.idStore)
setDataAirshipPOI(poi,formatDateISO8601)?.let { data.putAll(it) }
if(poi != null) {
setDataAirshipPOI(poi, formatDateISO8601)?.let { data.putAll(it) }
}
if(formatDateISO8601) {
data.put("date", displayDateFormatISO8601.format(regionLog.dateTime))
} else {
Expand Down

0 comments on commit f4124a8

Please sign in to comment.