Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): fix the inability to access revision form due to checking status #3227

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading