File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function processPlain(models: DMMF.Model[] | Readonly<DMMF.Model[]>) {
3131export function stringifyPlain (
3232 data : DMMF . Model ,
3333 isInputModelCreate = false ,
34- isInputModelUpdate = false ,
34+ isInputModelUpdate = false
3535) {
3636 const annotations = extractAnnotations ( data . documentation ) ;
3737
@@ -111,7 +111,7 @@ export function stringifyPlain(
111111 } else if ( processedEnums . find ( ( e ) => e . name === field . type ) ) {
112112 // biome-ignore lint/style/noNonNullAssertion: we checked this manually
113113 stringifiedType = processedEnums . find (
114- ( e ) => e . name === field . type ,
114+ ( e ) => e . name === field . type
115115 ) ! . stringRepresentation ;
116116 } else {
117117 return undefined ;
@@ -125,10 +125,11 @@ export function stringifyPlain(
125125
126126 if ( ! field . isRequired ) {
127127 stringifiedType = wrapWithNullable ( stringifiedType ) ;
128- if ( isInputModelUpdate ) {
129- stringifiedType = wrapWithOptional ( stringifiedType ) ;
130- madeOptional = true ;
131- }
128+ }
129+
130+ if ( isInputModelUpdate ) {
131+ stringifiedType = wrapWithOptional ( stringifiedType ) ;
132+ madeOptional = true ;
132133 }
133134
134135 if (
You can’t perform that action at this time.
0 commit comments