Skip to content

Commit

Permalink
Ignore abstract models during module validation
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Dec 20, 2022
1 parent 624af02 commit 929ab72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
- cli: `update` and `uninstall` commands no longer require a valid config.
- cli: Fixed a regression in `new` command leading to crash with `TypeError`.
- config: Fixed `jobs` section deserialization.
- database: Ignore abstract models during module validation.

## [6.4.0rc1] - 2022-12-09

Expand Down
2 changes: 2 additions & 0 deletions src/dipdup/utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def iter_models(package: Optional[str]) -> Iterator[tuple[str, Type[TortoiseMode

attr_value = getattr(module, attr)
if is_model_class(attr_value):
if getattr(getattr(attr_value, 'Meta', None), 'abstract', False):
continue
yield app, attr_value


Expand Down

0 comments on commit 929ab72

Please sign in to comment.