diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/DiningHallPreference.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/DiningHallPreference.kt index ed6cd318..e96e1101 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/DiningHallPreference.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/DiningHallPreference.kt @@ -4,7 +4,7 @@ import com.google.gson.annotations.Expose import com.google.gson.annotations.SerializedName class DiningHallPreference { - @SerializedName("venueId") + @SerializedName("venue_id") @Expose val id: Int? = null } diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/HomepageViewModel.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/HomepageViewModel.kt index b0e2d32d..b0f8169c 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/HomepageViewModel.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/classes/HomepageViewModel.kt @@ -317,12 +317,12 @@ class HomepageViewModel : HomepageDataModel, ViewModel() { studentLife.getDiningPreferences(bearerToken).subscribe({ preferences -> val list = preferences.preferences val venues = mutableListOf() - if (list?.isEmpty() == true) { + if (list.isNullOrEmpty()) { venues.add(593) venues.add(1442) venues.add(636) } else { - list?.forEach { + list.forEach { it.id?.let { it1 -> venues.add(it1) } } }