Skip to content

Commit

Permalink
fix prisma_generations: remove injections from output types
Browse files Browse the repository at this point in the history
  • Loading branch information
Natoandro committed Feb 22, 2024
1 parent 34026f3 commit 55c50ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl TypeGen for OutType {
}
Property::Unmanaged(type_id) => {
// just forward the original type
builder.prop(key, *type_id);
builder.prop(key, remove_injections_recursive(*type_id)?);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::runtimes::prisma::relationship::Cardinality;
use crate::runtimes::prisma::type_generation::count::Count;
use crate::t::{self, ConcreteTypeBuilder, TypeBuilder};
use crate::types::{TypeDefExt, TypeId};
use crate::utils::remove_injection;
use crate::utils::{remove_injection, remove_injections_recursive};

use super::TypeGen;

Expand Down Expand Up @@ -65,7 +65,7 @@ impl TypeGen for WithNestedCount {
}

Cardinality::One => {
builder.prop(key, prop.model_id);
builder.prop(key, remove_injections_recursive(prop.model_id)?);
}
}
}
Expand All @@ -76,7 +76,7 @@ impl TypeGen for WithNestedCount {
}

Property::Unmanaged(type_id) => {
builder.prop(key, *type_id);
builder.prop(key, remove_injections_recursive(*type_id)?);
}
}
}
Expand Down

0 comments on commit 55c50ed

Please sign in to comment.