From c3b95d20b6d5871b11a76f3ed9fc9e2afd519958 Mon Sep 17 00:00:00 2001 From: imabdulbasit Date: Wed, 18 Oct 2023 18:31:04 +0500 Subject: [PATCH] Fix batch mint query for selecting random mints --- api/src/mutations/mint.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/mutations/mint.rs b/api/src/mutations/mint.rs index da3de74..18e318a 100644 --- a/api/src/mutations/mint.rs +++ b/api/src/mutations/mint.rs @@ -1337,9 +1337,9 @@ impl Mutation { .select_also(metadata_jsons::Entity) .join( JoinType::InnerJoin, - metadata_jsons::Entity::belongs_to(CollectionMints) - .from(metadata_jsons::Column::Id) - .to(collection_mints::Column::Id) + collection_mints::Entity::belongs_to(metadata_jsons::Entity) + .from(collection_mints::Column::Id) + .to(metadata_jsons::Column::Id) .into(), ) .filter(collection_mints::Column::CollectionId.eq(drop.collection_id))