Skip to content

Commit 8ef3b51

Browse files
committed
fix response types for deletetags
1 parent b62e507 commit 8ef3b51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/schema/tags_schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from strawberry.types import Info
44

55
from api.models import Tag
6-
from api.schema.base_mutation import BaseMutation
6+
from api.schema.base_mutation import BaseMutation, MutationResponse
77
from api.utils.graphql_telemetry import trace_resolver
88
from authorization.permissions import IsAuthenticated
99

@@ -31,11 +31,11 @@ def delete_tag(self, info: Info, tag_id: str) -> bool:
3131
trace_name="delete_tags",
3232
trace_attributes={"component": "tag"},
3333
)
34-
def delete_tags(self, info: Info, tag_ids: list[str]) -> bool:
34+
def delete_tags(self, info: Info, tag_ids: list[str]) -> MutationResponse[bool]:
3535
"""Delete multiple tags."""
3636
try:
3737
tags = Tag.objects.filter(id__in=tag_ids)
3838
except Tag.DoesNotExist:
3939
raise ValueError(f"Tags with IDs {tag_ids} do not exist.")
4040
tags.delete()
41-
return True
41+
return MutationResponse.success_response(True)

0 commit comments

Comments
 (0)