Skip to content
Snippets Groups Projects
Commit f5f53842 authored by Klaus Fischer's avatar Klaus Fischer
Browse files

Changed order of Set

parent a57e5ca9
No related branches found
No related tags found
1 merge request!50Issue/719 changes to fit reference online service
......@@ -190,11 +190,18 @@ public abstract class FitConnectClient {
SentSubmission submission) {
var eventLog = await GetEventLogAsync(submission.CaseId, submission.DestinationId);
// TODO Change sorting to __logic__
var status = eventLog
.Where(e => e.SubmissionId == submission.SubmissionId)
.OrderBy(e => e.Iat)
.Select(e => CreateSubmissionStatusFromSet(submission, e))
.OrderBy(e => (int)e.SubmissionState)
.Last();
return status;
}
private static SubmissionStatus CreateSubmissionStatusFromSet(SentSubmission submission,
SecurityEventToken status) {
List<Problems>? problems = null;
if (status.Events?.AcceptSubmissionEvent != null) {
......@@ -209,7 +216,8 @@ public abstract class FitConnectClient {
else if (status.Events?.RejectSubmissionEvent != null)
problems = status.Events.RejectSubmissionEvent.Problems;
return new SubmissionStatus(status.EventType, problems);
var result = new SubmissionStatus(status.EventType, problems);
return result;
}
/// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment