Skip to content

Commit

Permalink
Fixes ambiguous model name in relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
Daverball committed Aug 2, 2024
1 parent 1f6bb54 commit 28c315f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/onegov/election_day/models/election/election.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,9 @@ def clear_results(self, clear_all: bool = False) -> None:
)

#: notifcations linked to this election
notifications: 'relationship[AppenderQuery[Notification]]' = relationship(
'Notification',
notifications: 'relationship[AppenderQuery[Notification]]'
notifications = relationship( # type:ignore[misc]
'onegov.election_day.models.notification.Notification',
back_populates='election',
lazy='dynamic'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ def elected_candidates(self) -> list[tuple[str, str]]:
return result

#: notifcations linked to this election compound
notifications: 'relationship[AppenderQuery[Notification]]' = relationship(
'Notification',
notifications: 'relationship[AppenderQuery[Notification]]'
notifications = relationship( # type:ignore[misc]
'onegov.election_day.models.notification.Notification',
back_populates='election_compound',
lazy='dynamic'
)
Expand Down
5 changes: 3 additions & 2 deletions src/onegov/election_day/models/vote/vote.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ def last_modified(cls) -> 'ColumnElement[datetime.datetime | None]':
)

#: notifcations linked to this vote
notifications: 'relationship[AppenderQuery[Notification]]' = relationship(
'Notification',
notifications: 'relationship[AppenderQuery[Notification]]'
notifications = relationship( # type:ignore[misc]
'onegov.election_day.models.notification.Notification',
back_populates='vote',
lazy='dynamic'
)
Expand Down

0 comments on commit 28c315f

Please sign in to comment.