Skip to content

Commit

Permalink
"lazy": "select",
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvey-Kuk committed Oct 29, 2024
1 parent 0dbcd98 commit 201572b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keep/api/models/db/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class Alert(SQLModel, table=True):
sa_relationship_kwargs={
"primaryjoin": "and_(Alert.fingerprint == foreign(AlertEnrichment.alert_fingerprint), Alert.tenant_id == AlertEnrichment.tenant_id)",
"uselist": False,
"lazy": "select",
}
)

Expand All @@ -233,12 +234,14 @@ class Alert(SQLModel, table=True):
))""",
"uselist": True,
"overlaps": "alert,incident",
"lazy": "select",
}
)
alert_to_incident_link: List[AlertToIncident] = Relationship(
back_populates="alert",
sa_relationship_kwargs={
"overlaps": "alerts,incidents"
"lazy": "select",
}
)

Expand Down

0 comments on commit 201572b

Please sign in to comment.