@@ -404,7 +404,7 @@ <h1>FastAdmin | Documentation</h1>
404404 </ li >
405405 < li >
406406 < strong > Updated:</ strong >
407- 13 April 2026
407+ 14 April 2026
408408 </ li >
409409 </ ul >
410410 </ div >
@@ -3378,7 +3378,7 @@ <h3>Methods and Attributes</h3>
33783378 return sort_by
33793379
33803380 async def serialize_obj_attributes(
3381- self, obj: Any, attributes_to_serizalize: list[ModelFieldWidgetSchema]
3381+ self, obj: Any, attributes_to_serizalize: list[ModelFieldWidgetSchema], list_view: bool = False
33823382 ) -> dict[str, Any]:
33833383 """Serialize orm model obj attribute to dict.
33843384
@@ -3395,7 +3395,7 @@ <h3>Methods and Attributes</h3>
33953395 value = format(value, "f")
33963396
33973397 serialized_dict[field.name] = value
3398- if field.form_widget_type in (WidgetType.UploadFile, WidgetType.UploadImage) and value:
3398+ if not list_view and field.form_widget_type in (WidgetType.UploadFile, WidgetType.UploadImage) and value:
33993399 serialized_dict[f"{field.name}__url"] = await self.get_file_url(field.name, value, obj)
34003400 if inspect.iscoroutinefunction(obj.__str__):
34013401 str_fn = obj.__str__
@@ -3443,7 +3443,7 @@ <h3>Methods and Attributes</h3>
34433443 else:
34443444 attributes_to_serizalize.append(field)
34453445
3446- obj_dict.update(await self.serialize_obj_attributes(obj, attributes_to_serizalize))
3446+ obj_dict.update(await self.serialize_obj_attributes(obj, attributes_to_serizalize, list_view=list_view ))
34473447
34483448 for field_name in fields_for_serialize:
34493449 display_field_function = getattr(self, field_name, None)
0 commit comments