Skip to content

Commit

Permalink
Rename Item.checkInAttention to requiresCheckInAttention
Browse files Browse the repository at this point in the history
Consistent with the naming used for Order.
  • Loading branch information
antweb committed Jan 17, 2025
1 parent fc8332a commit 7331279
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val db: SyncDa
if (variation != null) {
res.variation = variation.stringValue
}
val require_attention = item.checkInAttention
val require_attention = item.requiresCheckInAttention
res.isRequireAttention = require_attention || (variation?.isCheckin_attention == true)
res.checkinTexts = listOfNotNull(variation?.checkin_text?.trim(), item.checkInText?.trim()).filterNot { it.isBlank() }.filterNot { it.isBlank() || it == "null" }

Expand Down Expand Up @@ -708,7 +708,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val db: SyncDa
res.eventSlug = list.eventSlug
var require_attention = order.requiresCheckInAttention
try {
require_attention = require_attention || item.checkInAttention
require_attention = require_attention || item.requiresCheckInAttention
} catch (e: JSONException) {
sentry.captureException(e)
}
Expand Down Expand Up @@ -1110,7 +1110,7 @@ class AsyncCheckProvider(private val config: ConfigStore, private val db: SyncDa
}
var require_attention = order.requiresCheckInAttention
try {
require_attention = require_attention || item.checkInAttention || variation?.isCheckin_attention == true
require_attention = require_attention || item.requiresCheckInAttention || variation?.isCheckin_attention == true
} catch (e: JSONException) {
sentry.captureException(e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Item(
val mediaPolicy: MediaPolicy = MediaPolicy.NONE,
val mediaType: ReusableMediaType = ReusableMediaType.NONE,
val generateTickets: Boolean = false,
val checkInAttention: Boolean = false,
val requiresCheckInAttention: Boolean = false,

variations: JSONArray = JSONArray(),
bundles: JSONArray = JSONArray(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun Item.toModel(): ItemModel {
bundles = json.getJSONArray("bundles"),
addons = json.getJSONArray("addons"),
salesChannels = json.optJSONArray("sales_channels"),
checkInAttention = json.optBoolean("checkin_attention", false),
requiresCheckInAttention = json.optBoolean("checkin_attention", false),
)
}

Expand Down

0 comments on commit 7331279

Please sign in to comment.