Skip to content

Commit

Permalink
fix: support relationships as string
Browse files Browse the repository at this point in the history
  • Loading branch information
ViAchKoN committed Nov 26, 2024
1 parent 4d541dc commit ab24f60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dataclass_sqlalchemy_mixins/base/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_foreign_key_filtered_column(

if related_model:
# Updating original model to continue search
model = related_model.argument
model = related_model.entity.class_
models.append(model)
continue

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dataclass-sqlalchemy-mixins"
version = "0.3.0"
version = "0.3.1"
description = "Allows to convert dataclasses to sqlalchemy filters and orderings."
authors = ["ViAchKoN"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Group(BaseModel):
Owner.id,
),
)
owner = relationship(Owner)
owner = relationship("Owner")

items = relationship("Item", back_populates="group", lazy="dynamic")

Expand Down

0 comments on commit ab24f60

Please sign in to comment.