1
0
Fork 0
forked from alemi/upub

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