Skip to content

Commit

Permalink
refactor: Changed Poll document
Browse files Browse the repository at this point in the history
Replace workspace Link with BackLink, removed redundant declarations
  • Loading branch information
mike-pisman committed Dec 8, 2023
1 parent 1531b13 commit 394a16e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/unipoll_api/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,10 @@ async def remove_member(self, member: "Member", save: bool = True) -> bool:


class Poll(Resource):
id: ResourceID = Field(default_factory=ResourceID, alias="_id")
workspace: Link[Workspace]
workspace: BackLink[Workspace] = Field(original_field="polls")
public: bool
published: bool
questions: list
policies: list[Link["Policy"]]


class Policy(Document):
Expand Down

0 comments on commit 394a16e

Please sign in to comment.