-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move custom lists pydantic model into models package (#2187)
- Loading branch information
1 parent
7b3a977
commit 8d10cab
Showing
3 changed files
with
44 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from pydantic import NonNegativeInt | ||
|
||
from palace.manager.util.flask_util import CustomBaseModel | ||
|
||
|
||
class CustomListSharePostResponse(CustomBaseModel): | ||
successes: int = 0 | ||
failures: int = 0 | ||
|
||
|
||
class CustomListPostRequest(CustomBaseModel): | ||
name: str | ||
id: NonNegativeInt | None = None | ||
entries: list[dict] = [] | ||
collections: list[int] = [] | ||
deletedEntries: list[dict] = [] | ||
# For auto updating lists | ||
auto_update: bool = False | ||
auto_update_query: dict | None = None | ||
auto_update_facets: dict | None = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters