@@ -217,22 +217,18 @@ def format_collection(body: Json) -> Json:
217217 result ["schema" ] = body ["schema" ]
218218
219219 # New in 3.10
220- if "computedValues" in body :
221- result ["computedValues" ] = (
222- [
223- {
224- "name" : cv ["name" ],
225- "expression" : cv ["expression" ],
226- "overwrite" : cv ["overwrite" ],
227- "computedOn" : cv ["computedOn" ],
228- "keepNull" : cv ["keepNull" ],
229- "failOnWarning" : cv ["failOnWarning" ],
230- }
231- for cv in body ["computedValues" ]
232- ]
233- if body .get ("computedValues" ) is not None
234- else None
235- )
220+ if body .get ("computedValues" ) is not None :
221+ result ["computedValues" ] = [
222+ {
223+ "name" : cv ["name" ],
224+ "expression" : cv ["expression" ],
225+ "overwrite" : cv ["overwrite" ],
226+ "computedOn" : cv ["computedOn" ],
227+ "keepNull" : cv ["keepNull" ],
228+ "failOnWarning" : cv ["failOnWarning" ],
229+ }
230+ for cv in body ["computedValues" ]
231+ ]
236232 if "internalValidatorType" in body :
237233 result ["internal_validator_type" ] = body ["internalValidatorType" ]
238234
0 commit comments