-
Notifications
You must be signed in to change notification settings - Fork 0
Plugin Support #92
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
Plugin Support #92
Changes from all commits
df26239
12977e5
096d587
6f86d6e
220c005
b743302
dea0b72
e1fe2c5
27b56b3
8329567
24471ac
4462eb0
ce1cb08
ed923a9
1249205
1490e39
1901198
2982bad
0694103
714d7a3
3e378e8
68b7ea8
43cf320
dcf4ef8
363fa4d
1295d13
af05bfc
4448e0d
d4fb116
923d244
a599ac5
fad4d23
aa10f84
56ec913
2e6744c
424b7d8
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 |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import sys | ||
| sys.path.append("src") | ||
| from unipoll_api import app # noqa: E402 | ||
| from unipoll_api import entry_points # noqa: E402 | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| app.cli_entry_point() | ||
| entry_points.cli_entry_point() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from . import account as AccountActions # noqa: F401 | ||
| from . import group as GroupActions # noqa: F401 | ||
| from . import policy as PolicyActions # noqa: F401 | ||
| from . import poll as PollActions # noqa: F401 | ||
| from . import authentication as AuthActions # noqa: F401 | ||
| from . import workspace as WorkspaceActions # noqa: F401 | ||
| from . import permissions as PermissionsActions # noqa: F401 | ||
| from . import members as MembersActions # noqa: F401 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,11 +1,12 @@ | ||||||||||||||||||||||||||||||||
| from bson import DBRef | ||||||||||||||||||||||||||||||||
| from beanie.odm.bulk import BulkWriter | ||||||||||||||||||||||||||||||||
| from unipoll_api import AccountManager | ||||||||||||||||||||||||||||||||
| from unipoll_api import actions | ||||||||||||||||||||||||||||||||
| from . import plugins, group as GroupActions, policy as PolicyActions, poll as PollActions, members as MembersActions | ||||||||||||||||||||||||||||||||
| from unipoll_api.documents import Workspace, Account, Policy, Member | ||||||||||||||||||||||||||||||||
| from unipoll_api.utils import Permissions | ||||||||||||||||||||||||||||||||
| from unipoll_api.schemas import WorkspaceSchemas | ||||||||||||||||||||||||||||||||
| from unipoll_api.exceptions import WorkspaceExceptions | ||||||||||||||||||||||||||||||||
| # from unipoll_api.dependencies import get_member | ||||||||||||||||||||||||||||||||
| # from unipoll_api.dependencies import get_member_by_account | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
Comment on lines
+9
to
11
|
||||||||||||||||||||||||||||||||
| # from unipoll_api.dependencies import get_member_by_account |
Copilot
AI
Jul 30, 2025
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.
Remove or address the large block of commented-out code (lines 110-131) as it clutters the implementation. Consider creating a proper TODO item or issue if this represents future work.
| # BUG: Deleting workspace also deletes account | |
| # TODO: Find a way to keep the account | |
| # from beanie import DeleteRules | |
| # await Workspace.delete(workspace, link_rule=DeleteRules.DELETE_LINKS) | |
| # await Workspace.delete(workspace) | |
| # if await workspace.get(workspace.id): | |
| # raise WorkspaceExceptions.ErrorWhileDeleting(workspace.id) | |
| # await Policy.find({"parent_resource": workspace_ref}).delete() | |
| # mems = await Member.find(Member.workspace.id == workspace.id, fetch_links=True).delete() | |
| # TODO: Implement proper workspace deletion logic, ensuring related entities (e.g., members, policies) are handled correctly. | |
| # Address the issue where deleting a workspace also deletes the account. Track this work in ISSUE-1234. | |
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.
Address the FIXME comment by either removing the unused imports or removing the comment if the imports are still needed.