Skip to content

Commit

Permalink
Removed counter to id code (#509)
Browse files Browse the repository at this point in the history
Closes #507 

This was tested out in devpub (current image there now). Counter is
correctly being used by the frontend, backend no longer has need for the
logic to set the submission id to the counter.
  • Loading branch information
jcadam14 authored Nov 25, 2024
1 parent 9d36c34 commit 26cc187
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 0 additions & 7 deletions src/sbl_filing_api/entities/models/dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ class SubmissionDTO(BaseModel):
submitter: UserActionDTO
accepter: UserActionDTO | None = None

@model_validator(mode="after")
def validate_fi(self) -> "SubmissionDTO":
print(f"Self: {self}")
self.id = self.counter
print(f"Self: {self}")
return self


class FilingTaskDTO(BaseModel):
model_config = ConfigDict(from_attributes=True)
Expand Down
3 changes: 2 additions & 1 deletion tests/api/routers/test_filing_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,8 @@ async def test_accept_submission(self, mocker: MockerFixture, app_fixture: FastA
)

assert res.json()["state"] == "SUBMISSION_ACCEPTED"
assert res.json()["id"] == 4
assert res.json()["id"] == 1
assert res.json()["counter"] == 4
assert res.json()["accepter"]["id"] == 3
assert res.json()["accepter"]["user_id"] == "1234-5678-ABCD-EFGH"
assert res.json()["accepter"]["user_name"] == "test accepter"
Expand Down

0 comments on commit 26cc187

Please sign in to comment.