fix: id could not be found to build model, oooohhh

This commit is contained in:
əlemi 2024-05-27 21:03:56 +02:00
parent dd67b005dc
commit 91612e4d5a
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -186,6 +186,7 @@ impl Context {
.filter(model::object::Column::Internal.eq(internal)) .filter(model::object::Column::Internal.eq(internal))
.select_only() .select_only()
.select_column(model::object::Column::Internal) .select_column(model::object::Column::Internal)
.into_tuple::<i64>()
.one(self.db()) .one(self.db())
.await? .await?
.is_some() .is_some()
@ -198,6 +199,7 @@ impl Context {
.filter(model::activity::Column::Internal.eq(internal)) .filter(model::activity::Column::Internal.eq(internal))
.select_only() .select_only()
.select_column(model::activity::Column::Internal) .select_column(model::activity::Column::Internal)
.into_tuple::<i64>()
.one(self.db()) .one(self.db())
.await? .await?
.is_some() .is_some()
@ -208,9 +210,10 @@ impl Context {
pub async fn is_local_internal_actor(&self, internal: i64) -> crate::Result<bool> { pub async fn is_local_internal_actor(&self, internal: i64) -> crate::Result<bool> {
Ok( Ok(
model::actor::Entity::find() model::actor::Entity::find()
.filter(model::activity::Column::Internal.eq(internal)) .filter(model::actor::Column::Internal.eq(internal))
.select_only() .select_only()
.select_column(model::actor::Column::Internal) .select_column(model::actor::Column::Internal)
.into_tuple::<i64>()
.one(self.db()) .one(self.db())
.await? .await?
.is_some() .is_some()