We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 541012c commit ea244c9Copy full SHA for ea244c9
src/sentry/workflow_engine/models/data_condition_group.py
@@ -8,6 +8,7 @@
8
from sentry.backup.scopes import RelocationScope
9
from sentry.db.models import DefaultFieldsModel, region_silo_model, sane_repr
10
from sentry.db.models.manager.base import BaseManager
11
+from sentry.db.models.utils import is_model_attr_cached
12
from sentry.workflow_engine.models.data_condition import DataConditionSnapshot
13
14
@@ -48,7 +49,7 @@ class Type(StrEnum):
48
49
50
def get_snapshot(self) -> DataConditionGroupSnapshot:
51
conditions = []
- if hasattr(self, "conditions"):
52
+ if is_model_attr_cached(self, "conditions"):
53
conditions = [cond.get_snapshot() for cond in self.conditions.all()]
54
55
return {
0 commit comments