File tree 1 file changed +7
-6
lines changed
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[]>) {
31
31
export function stringifyPlain (
32
32
data : DMMF . Model ,
33
33
isInputModelCreate = false ,
34
- isInputModelUpdate = false ,
34
+ isInputModelUpdate = false
35
35
) {
36
36
const annotations = extractAnnotations ( data . documentation ) ;
37
37
@@ -111,7 +111,7 @@ export function stringifyPlain(
111
111
} else if ( processedEnums . find ( ( e ) => e . name === field . type ) ) {
112
112
// biome-ignore lint/style/noNonNullAssertion: we checked this manually
113
113
stringifiedType = processedEnums . find (
114
- ( e ) => e . name === field . type ,
114
+ ( e ) => e . name === field . type
115
115
) ! . stringRepresentation ;
116
116
} else {
117
117
return undefined ;
@@ -125,10 +125,11 @@ export function stringifyPlain(
125
125
126
126
if ( ! field . isRequired ) {
127
127
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 ;
132
133
}
133
134
134
135
if (
You can’t perform that action at this time.
0 commit comments