mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
sqlite: Enforce that occurences in calendarobjects are processable by date()
This commit is contained in:
@@ -337,7 +337,7 @@ impl SqliteCalendarStore {
|
|||||||
|
|
||||||
(if overwrite {
|
(if overwrite {
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"REPLACE INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
|
"REPLACE INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, date(?), date(?), ?, ?)",
|
||||||
principal,
|
principal,
|
||||||
cal_id,
|
cal_id,
|
||||||
object_id,
|
object_id,
|
||||||
@@ -350,7 +350,7 @@ impl SqliteCalendarStore {
|
|||||||
} else {
|
} else {
|
||||||
// If the object already exists a database error is thrown and handled in error.rs
|
// If the object already exists a database error is thrown and handled in error.rs
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"INSERT INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
|
"INSERT INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, date(?), date(?), ?, ?)",
|
||||||
principal,
|
principal,
|
||||||
cal_id,
|
cal_id,
|
||||||
object_id,
|
object_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user