Skip to content

Commit d5952cd

Browse files
Fix missing playaLocation on events
1 parent e6f0356 commit d5952cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

iBurn/BRCDataImporter.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ - (BOOL) loadDataFromJSONData:(NSData*)jsonData
254254
@autoreleasepool {
255255
////////////////
256256
#warning Remove me when playa location data is fixed
257-
if (object.location && !object.playaLocation) {
257+
if (object.location && object.playaLocation.length == 0) {
258258
NSString *playaLocation = [geocoder reverseLookup:object.location.coordinate];
259259
if (playaLocation.length > 0) {
260260
object.playaLocation = playaLocation;
@@ -311,6 +311,12 @@ - (BOOL) loadDataFromJSONData:(NSData*)jsonData
311311
event.artName = art.title;
312312
event.coordinate = art.coordinate;
313313
}
314+
if (event.location && event.playaLocation.length == 0) {
315+
NSString *playaLocation = [geocoder reverseLookup:event.location.coordinate];
316+
if (playaLocation.length > 0) {
317+
event.playaLocation = playaLocation;
318+
}
319+
}
314320
[objectsToUpdate addObject:event];
315321
}
316322
}];

0 commit comments

Comments
 (0)