Skip to content

Commit 99ab478

Browse files
committed
Fix sort by and search by relations. Fix example.
1 parent c17c6a9 commit 99ab478

3 files changed

Lines changed: 39 additions & 6 deletions

File tree

docs/build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def read_cls_docstring(cls):
4242

4343
def get_versions():
4444
return [
45+
{
46+
"version": "0.3.4",
47+
"changes": ["Fix sort by and search by relations. Fix examples."],
48+
},
4549
{
4650
"version": "0.3.3",
4751
"changes": [

docs/index.html

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ <h4 class="title">FastAdmin</h4>
196196

197197
<ul class="nav flex-column">
198198

199+
<li class="nav-item">
200+
<a class="nav-link" href="#v0_3_4">v0.3.4</a>
201+
</li>
202+
199203
<li class="nav-item">
200204
<a class="nav-link" href="#v0_3_3">v0.3.3</a>
201205
</li>
@@ -319,7 +323,7 @@ <h1>FastAdmin | Documentation</h1>
319323
<div class="row">
320324
<div class="col-sm-6 col-lg-4">
321325
<ul class="list-unstyled">
322-
<li><strong>Version:</strong> 0.3.3</li>
326+
<li><strong>Version:</strong> 0.3.4</li>
323327
<li>
324328
<strong>Author:</strong>
325329
<a href="mailto:vsdudakov@gmail.com" target="_blank">
@@ -336,7 +340,7 @@ <h1>FastAdmin | Documentation</h1>
336340
</li>
337341
<li>
338342
<strong>Updated:</strong>
339-
19 February 2026
343+
22 February 2026
340344
</li>
341345
</ul>
342346
</div>
@@ -2410,12 +2414,12 @@ <h3>Methods and Attributes</h3>
24102414
return serialized_dict
24112415

24122416
async def _serialize_obj_after_save(self, obj: Any) -> dict:
2413-
"""Serialize object after save; re-fetch if detached (e.g. SQLAlchemy after commit)."""
2417+
"""Serialize object after save; re-fetch if detached/session is over."""
24142418
try:
24152419
return await self.serialize_obj(obj)
24162420
except Exception as exc:
2417-
# SQLAlchemy DetachedInstanceError when session is closed after commit
2418-
if exc.__class__.__name__ != "DetachedInstanceError":
2421+
# ORM-specific detached/session-over cases after commit.
2422+
if exc.__class__.__name__ not in {"DetachedInstanceError", "DatabaseSessionIsOver"}:
24192423
raise
24202424
pk_name = self.get_model_pk_name(self.model_cls)
24212425
pk = getattr(obj, pk_name, None)
@@ -3254,6 +3258,31 @@ <h2>Changelog</h2>
32543258

32553259

32563260

3261+
<section id="v0_3_4">
3262+
<h3>v0.3.4</h3>
3263+
3264+
3265+
3266+
<p class="text-4">
3267+
Fix sort by and search by relations. Fix examples.
3268+
</p>
3269+
3270+
3271+
3272+
3273+
3274+
3275+
3276+
3277+
3278+
3279+
3280+
3281+
3282+
3283+
</section>
3284+
3285+
32573286
<section id="v0_3_3">
32583287
<h3>v0.3.3</h3>
32593288

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fastadmin"
3-
version = "0.3.3"
3+
version = "0.3.4"
44
description = "FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Flask/Django inspired by Django Admin."
55
authors = ["Seva D <vsdudakov@gmail.com>"]
66
license = "MIT"

0 commit comments

Comments
 (0)