File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ impl SerField {
7575 }
7676}
7777
78- fn serialization_exclude_if ( exclude_if_callable : & Option < Py < PyAny > > , value : & Bound < ' _ , PyAny > ) -> PyResult < bool > {
78+ fn serialization_exclude_if ( exclude_if_callable : Option < & Py < PyAny > > , value : & Bound < ' _ , PyAny > ) -> PyResult < bool > {
7979 if let Some ( exclude_if_callable) = exclude_if_callable {
8080 let py = value. py ( ) ;
8181 let result = exclude_if_callable. call1 ( py, ( value, ) ) ?;
@@ -194,7 +194,7 @@ impl GeneralFieldsSerializer {
194194 if exclude_default ( & value, & field_extra, serializer) ? {
195195 continue ;
196196 }
197- if serialization_exclude_if ( & field. serialization_exclude_if , & value) ? {
197+ if serialization_exclude_if ( field. serialization_exclude_if . as_ref ( ) , & value) ? {
198198 continue ;
199199 }
200200 let value =
@@ -275,7 +275,8 @@ impl GeneralFieldsSerializer {
275275 if exclude_default ( & value, & field_extra, serializer) . map_err ( py_err_se_err) ? {
276276 continue ;
277277 }
278- if serialization_exclude_if ( & field. serialization_exclude_if , & value) . map_err ( py_err_se_err) ? {
278+ if serialization_exclude_if ( field. serialization_exclude_if . as_ref ( ) , & value)
279+ . map_err ( py_err_se_err) ? {
279280 continue ;
280281 }
281282 let s = PydanticSerializer :: new (
You can’t perform that action at this time.
0 commit comments