Skip to content

Commit

Permalink
[MDS-5450] Use selectin loader for Incident documents, and TSFs (#2640)
Browse files Browse the repository at this point in the history
* component layout for home page. Search bar will require some changes so just remade in functional/TS format

* actions, reducers, selectors, etc, for getting global mine alerts. Change route to point to new home page (will rename later)

* MDS-5450 Use selectin for incident documents and TSFs

* Revert "component layout for home page. Search bar will require some changes so just remade in functional/TS format"

This reverts commit 3ab20a7.

* Revert "actions, reducers, selectors, etc, for getting global mine alerts. Change route to point to new home page (will rename later)"

This reverts commit 7339823.

---------

Co-authored-by: Tara Epp <[email protected]>
Co-authored-by: simensma-fresh <[email protected]>
  • Loading branch information
3 people authored Aug 30, 2023
1 parent 6b7c74d commit f1ca519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions services/core-api/app/api/incidents/models/mine_incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ class MineIncident(SoftDeleteMixin, AuditMixin, Base):
lazy='selectin')

# Note there is a dependency on deleted_ind in mine_documents
documents = db.relationship('MineIncidentDocumentXref', lazy='joined')
documents = db.relationship('MineIncidentDocumentXref', lazy='selectin')
mine_documents = db.relationship(
'MineDocument',
lazy='joined',
lazy='selectin',
secondary='mine_incident_document_xref',
secondaryjoin='and_(foreign(MineIncidentDocumentXref.mine_document_guid) == remote(MineDocument.mine_document_guid),MineDocument.deleted_ind == False)'
)
Expand Down
2 changes: 1 addition & 1 deletion services/core-api/app/api/mines/mine/models/mine.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Mine(SoftDeleteMixin, AuditMixin, Base):
'MineTailingsStorageFacility',
backref='mine',
order_by='desc(MineTailingsStorageFacility.update_timestamp)',
lazy='joined')
lazy='selectin')

# Almost always used, but faster to use selectin to load related data
_permit_identities = db.relationship(
Expand Down

0 comments on commit f1ca519

Please sign in to comment.