File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/sentry/workflow_engine/models Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 33import builtins
44import logging
55from enum import StrEnum
6- from typing import TYPE_CHECKING , Any , ClassVar
6+ from typing import TYPE_CHECKING , ClassVar , TypedDict
77
88from django .db import models
99from django .db .models import Q
3030logger = logging .getLogger (__name__ )
3131
3232
33+ class ActionSnapshot (TypedDict ):
34+ id : int
35+ type : Action .Type
36+
37+
3338class 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 ]:
You can’t perform that action at this time.
0 commit comments