Skip to content

Commit 45508c9

Browse files
committed
whoops, missed a snapshot type
1 parent ea244c9 commit 45508c9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/sentry/workflow_engine/models/action.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import builtins
44
import logging
55
from enum import StrEnum
6-
from typing import TYPE_CHECKING, Any, ClassVar
6+
from typing import TYPE_CHECKING, ClassVar, TypedDict
77

88
from django.db import models
99
from django.db.models import Q
@@ -30,6 +30,11 @@
3030
logger = logging.getLogger(__name__)
3131

3232

33+
class ActionSnapshot(TypedDict):
34+
id: int
35+
type: Action.Type
36+
37+
3338
class ActionManager(BaseManager["Action"]):
3439
def get_queryset(self) -> BaseQuerySet[Action]:
3540
return (
@@ -112,10 +117,10 @@ class Meta:
112117
),
113118
]
114119

115-
def get_snapshot(self) -> dict[str, Any]:
120+
def get_snapshot(self) -> ActionSnapshot:
116121
return {
117122
"id": self.id,
118-
"type": self.type,
123+
"type": Action.Type(self.type),
119124
}
120125

121126
def get_handler(self) -> builtins.type[ActionHandler]:

0 commit comments

Comments
 (0)