Skip to content

Commit 5f89403

Browse files
authored
Fix for is_pk (#90)
* Fix for is_pk
1 parent a5d9f8d commit 5f89403

8 files changed

Lines changed: 493 additions & 443 deletions

File tree

docs/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ def read_cls_docstring(cls):
3939

4040
def get_versions():
4141
return [
42+
{
43+
"version": "0.2.19",
44+
"changes": [
45+
"Fix for is_pk for tortoise orm.",
46+
],
47+
},
4248
{
4349
"version": "0.2.18",
4450
"changes": [

docs/index.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

fastadmin/models/orms/tortoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def get_model_fields_with_widget_types(
6262
if with_upload is not None and with_upload and not is_upload:
6363
continue
6464

65-
is_pk = getattr(orm_model_field, "index", False)
65+
is_pk = getattr(orm_model_field, "pk", False)
6666
is_immutable = (
6767
is_pk or getattr(orm_model_field, "auto_now", False) or getattr(orm_model_field, "auto_now_add", False)
6868
) and field_name not in self.readonly_fields

fastadmin/static/assets/worker-6Z7niv9l.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fastadmin/static/index.min.js

Lines changed: 238 additions & 238 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/yarn.lock

Lines changed: 192 additions & 167 deletions
Large diffs are not rendered by default.

poetry.lock

Lines changed: 39 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.2.18"
3+
version = "0.2.19"
44
description = "FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Flask/Django inspired by Django Admin."
55
authors = ["Seva D <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)