Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Jul 9, 2024
1 parent 626741e commit a9ae10f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.loculus.backend.utils.Version
import org.loculus.backend.utils.toTimestamp
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import org.loculus.backend.utils.toUtcDateString

private val log = KotlinLogging.logger { }

Expand Down Expand Up @@ -64,10 +65,10 @@ class ReleasedDataModel(
("submitter" to TextNode(rawProcessedData.submitter)) +
("groupId" to IntNode(rawProcessedData.groupId)) +
("groupName" to TextNode(rawProcessedData.groupName)) +
("submittedDate" to TextNode(rawProcessedData.submittedAtTimestamp.toUtcDate())) +
("submittedDate" to TextNode(rawProcessedData.submittedAtTimestamp.toUtcDateString())) +
("submittedAtTimestamp" to LongNode(rawProcessedData.submittedAtTimestamp.toTimestamp())) +
("releasedAtTimestamp" to LongNode(rawProcessedData.releasedAtTimestamp.toTimestamp())) +
("releasedDate" to TextNode(rawProcessedData.releasedAtTimestamp.toUtcDate())) +
("releasedDate" to TextNode(rawProcessedData.releasedAtTimestamp.toUtcDateString())) +
("versionStatus" to TextNode(siloVersionStatus.name)) +
("dataUseTerms" to TextNode(currentDataUseTerms.type.name)) +
("dataUseTermsRestrictedUntil" to restrictedDataUseTermsUntil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class SubmissionDatabaseService(
table.submissionIdColumn,
table.submitterColumn,
table.groupIdColumn,
table.submittedAtColumn,
table.submittedAtTimestampColumn,
)
.where {
table.organismIs(organism) and
Expand Down Expand Up @@ -165,7 +165,7 @@ class SubmissionDatabaseService(
submissionId = it[table.submissionIdColumn],
submitter = it[table.submitterColumn],
groupId = it[table.groupIdColumn],
submittedAt = it[table.submittedAtColumn].toTimestamp(),
submittedAt = it[table.submittedAtTimestampColumn].toTimestamp(),
)
}
updateStatusToProcessing(chunkOfUnprocessedData, pipelineVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class GetReleasedDataEndpointTest(
"groupId" -> assertThat(value.intValue(), `is`(greaterThan(0)))
"accession", "version", "accessionVersion", "submissionId" -> {}
"dataUseTerms" -> assertThat(value, `is`(TextNode("OPEN")))
"submittedDate" to TextNode(Clock.System.now().toLocalDateTime(TimeZone.UTC).date.toString()),
"submittedDate" -> assertThat(value, `is`(TextNode(Clock.System.now().toLocalDateTime(TimeZone.UTC).date.toString())))
else -> assertThat("value for $key", value, `is`(NullNode.instance))
}
}
Expand Down

0 comments on commit a9ae10f

Please sign in to comment.