-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDESK-7461] - Assignment Delivery async resource & service (#2157)
* Created assignment delivery async resource and service * Suggested fixes
- Loading branch information
1 parent
3bfad45
commit fcbea1f
Showing
6 changed files
with
66 additions
and
4 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,6 @@ | ||
from planning.types import DeliveryResourceModel | ||
from superdesk.core.resources import AsyncResourceService | ||
|
||
|
||
class DeliveryAsyncService(AsyncResourceService[DeliveryResourceModel]): | ||
pass |
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
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,17 @@ | ||
from pydantic import Field | ||
from typing import Annotated | ||
from datetime import datetime | ||
|
||
from superdesk.core.resources import ResourceModelWithObjectId, fields | ||
from superdesk.core.resources.validators import validate_data_relation_async | ||
|
||
|
||
class DeliveryResourceModel(ResourceModelWithObjectId): | ||
planning_id: Annotated[fields.Keyword, validate_data_relation_async("planning")] | ||
coverage_id: str | None = None | ||
assignment_id: Annotated[fields.ObjectId, validate_data_relation_async("assignments")] | ||
item_id: str | None = None | ||
item_state: str | None = None | ||
sequence_no: int = Field(default=0) | ||
publish_time: datetime | None = None | ||
scheduled_update_id: str | None = None |