[MDS-6771] Fix for wrong mine manager getting email #3821
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Objective
MDS-6771
-The fix for this ended up to be pretty small. For the mine in production it has the mine manager Mike Allen as a record in the
mine_party_appttable and that hasdeleted_ind= True, this record also does not have an end_date.The problem is then with the retrieval of the
mine_managerdone in themine.pyfile the conditions for choosing which mine manager to return are in part depending on anend_dateand because Mike Allen's record has no end date it actually ends up passing all the conditions, and the retrieval of the mine manager returns the first record that passes all the conditions. We end up seeing Alex Mcleod as a recipient of the email which is fine since he is the submitter, and we also then see Mike Allen as a recipient too and that is because Mike Allen is the record that ends up being returned first when retrieving the mine manager thereby taking the place of the actual current mine manager David Baines.