Skip to content

Commit

Permalink
fix(backend): fix the inability to access revision form due to checki…
Browse files Browse the repository at this point in the history
…ng status (#3227)

* fix unable to edit

* remove test for removed line
  • Loading branch information
theosanderson authored Nov 18, 2024
1 parent 281b6e8 commit fda0b01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,6 @@ class SubmissionDatabaseService(
accessionPreconditionValidator.validate {
thatAccessionVersionExists(accessionVersion)
.andThatUserIsAllowedToEditSequenceEntries(authenticatedUser)
.andThatSequenceEntriesAreInStates(listOf(Status.PROCESSED))
.andThatOrganismIs(organism)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,6 @@ class GetDataToEditEndpointTest(
)
}

@Test
fun `WHEN I query a sequence entry that has a wrong state THEN refuses request with unprocessable entity`() {
val firstAccession = convenienceClient.prepareDataTo(Status.IN_PROCESSING).first().accession

client.getSequenceEntryToEdit(
accession = firstAccession,
version = 1,
)
.andExpect(status().isUnprocessableEntity)
.andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
.andExpect(
jsonPath("\$.detail").value(
"Accession versions are in not in one of the states " +
"[PROCESSED]: $firstAccession.1 - IN_PROCESSING",
),
)
}

@Test
fun `WHEN I try to get data for a sequence entry that I do not own THEN refuses request with forbidden entity`() {
val firstAccession = convenienceClient.prepareDataTo(Status.PROCESSED, errors = true).first().accession
Expand Down

0 comments on commit fda0b01

Please sign in to comment.