File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
libpretixsync/src/main/java/eu/pretix/libpretixsync/models/db Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ import eu.pretix.libpretixsync.models.Receipt as ReceiptModel
66fun Receipt.toModel () =
77 ReceiptModel (
88 id = id,
9- eventSlug = event_slug!! ,
9+ eventSlug = if (event_slug == null && id == 1L ) {
10+ // This case occurs when upgrading a device from pre-sqldelight to post-sqldelight
11+ // that previously was not ever properly used. It therefore contains only the receipt
12+ // with id=1 and isOpen=true, that has eventSlug=null because it was created before
13+ // the first event was selected.
14+ " "
15+ } else { event_slug!! },
1016 paymentType = ReceiptModel .PaymentType .valueOf(payment_type!! .uppercase()),
1117 currency = currency,
1218 orderCode = order_code,
You can’t perform that action at this time.
0 commit comments