Skip to content

Commit 30b52a0

Browse files
arsandhuAnmol Sandhu
andauthored
fix: [DEV-13100] add dataset_id to Workflow type (#383)
Co-authored-by: Anmol Sandhu <anmolsandhu@Mac.cable.rcn.com>
1 parent f09feb7 commit 30b52a0

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

indico/queries/gallery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING
1+
from typing import TYPE_CHECKING, List
22

33
from indico.client.request import GraphQLRequest, PagedRequestV2
44
from indico.types.component_blueprint import BlueprintPage, BlueprintTags
@@ -112,7 +112,7 @@ class GetGalleryTags(GraphQLRequest[BlueprintTags]):
112112
def __init__(
113113
self,
114114
component_family: "Optional[str]" = None,
115-
tag_categories: "Optional[list[str]]" = None,
115+
tag_categories: "Optional[List[str]]" = None,
116116
):
117117
self.component_family = component_family
118118
self.tag_categories = tag_categories

indico/queries/workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class ListWorkflows(GraphQLRequest["List[Workflow]"]):
7676
}
7777
7878
}
79+
datasetId
7980
}
8081
}
8182
}

indico/types/workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Workflow(BaseType):
4545
id: int
4646
name: str
4747
status: str
48+
dataset_id: int
4849
review_enabled: bool
4950
auto_review_enabled: bool
5051
components: List[WorkflowComponent]

tests/integration/queries/test_gallery.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
2+
23
from indico.client import IndicoClient
3-
from indico.queries.gallery import ListGallery, GetGalleryTags
4+
from indico.queries.gallery import GetGalleryTags, ListGallery
45
from indico.types.component_blueprint import BlueprintPage, BlueprintTags
56

67

@@ -76,9 +77,9 @@ def test_list_gallery_pagination(indico):
7677
if len(blueprints) >= 2:
7778
# Check that we have unique blueprints
7879
blueprint_ids = [bp.id for bp in blueprints]
79-
assert len(blueprint_ids) == len(set(blueprint_ids)), (
80-
"Duplicate blueprints found in pagination"
81-
)
80+
assert len(blueprint_ids) == len(
81+
set(blueprint_ids)
82+
), "Duplicate blueprints found in pagination"
8283

8384

8485
def test_get_gallery_tags(indico):

0 commit comments

Comments
 (0)