Skip to content

Commit 4f83dfb

Browse files
committed
Approval status fix
1 parent cc1a353 commit 4f83dfb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"NotStarted", "InProgress", "QualityCheck", "Returned", "Completed", "Skipped"
8484
]
8585

86-
APPROVAL_STATUS = Literal["Approved", "Disapproved"]
86+
APPROVAL_STATUS = Literal["Approved", "Disapproved", None]
8787

8888
IMAGE_QUALITY = Literal["compressed", "original"]
8989

@@ -3101,7 +3101,7 @@ def add_items_to_subset(
31013101
def set_approval_statuses(
31023102
self,
31033103
project: NotEmptyStr,
3104-
approval_status: Union[APPROVAL_STATUS, None],
3104+
approval_status: APPROVAL_STATUS,
31053105
items: Optional[List[NotEmptyStr]] = None,
31063106
):
31073107
"""Sets annotation statuses of items

src/superannotate/lib/infrastructure/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def make_literal_validator(
2222
Adding ability to input literal in the lower case.
2323
"""
2424
permitted_choices = validators.all_literal_values(type_)
25-
allowed_choices = {v.lower(): v for v in permitted_choices}
25+
allowed_choices = {v.lower() if v else v: v for v in permitted_choices}
2626

2727
def literal_validator(v: typing.Any) -> typing.Any:
2828
try:

0 commit comments

Comments
 (0)