You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have already brought it up in the Discord channel, but would like to open an issue for further investigation.
When I try to insert a Option<Date>wit value None the inserting fails with panic.
DB: Postgres
Version. 0.2.4
#[derive(Clone,Debug,PartialEq,DeriveEntityModel)]#[sea_orm(table_name = "users")]pubstructModel{#[sea_orm(primary_key, auto_increment = false)]pubid:Uuid,pubcreated_at:DateTimeWithTimeZone// the problematic type #[sea_orm(column_type = "Date", nullable)]pubbirth_date:Option<Date>}
#[post("/")]asyncfncreate(data: web::Data<AppState>,) -> Result<HttpResponse,Error>{let conn = &data.conn;// Simulate incoming data from json that could be nonelet fakeData = FakeData{date:Option::None};Users::ActiveModel{id:Set(Uuid::new_v4()),birth_date:Set(fakeData.date),
..Default::default()}.insert(conn).await.expect("could not insert user");Ok(HttpResponse::new(StatusCode::OK))}
thread 'actix-rt|system:0|arbiter:0' panicked at 'not Value::Date', /Users/tyrus/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/sea-query-0.16.5/src/value.rs:347:18
The text was updated successfully, but these errors were encountered:
I have already brought it up in the Discord channel, but would like to open an issue for further investigation.
When I try to insert a
Option<Date>
wit valueNone
the inserting fails with panic.DB: Postgres
Version. 0.2.4
thread 'actix-rt|system:0|arbiter:0' panicked at 'not Value::Date', /Users/tyrus/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/sea-query-0.16.5/src/value.rs:347:18
The text was updated successfully, but these errors were encountered: