-
Notifications
You must be signed in to change notification settings - Fork 2
Improvements for fastapi #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,12 @@ def get_models() -> str: | |
| if model is base_class: | ||
| continue | ||
|
|
||
| # Check if it's an abstract model (has __abstract__ = True) | ||
| if getattr(model, "__abstract__", False): | ||
| # Check if it's an abstract model (has __abstract__ = True). | ||
| # Note that we check the dict instead of using getattr, | ||
| # so that we check the attribute on the specific model, | ||
| # otherwise we may access the attribute inherited from | ||
| # parent. | ||
| if model.__dict__.get("__abstract__", False): | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FastAPI uses sqlmodel, which is built on top of sqlalchemy. Models inherit from |
||
| continue | ||
|
|
||
| # Check if it has any columns (indicating it's a concrete model) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of FastAPI the full path is
/tidewave/at this point.