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

Ticket 4695 + 4169 (Scenario 1). Validation of OIPC Review Layer #4900

Merged
merged 1 commit into from
Dec 15, 2023
Merged
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 @@ -257,13 +257,13 @@ def getstatesummary(cls, ministryrequestid):
sql =select status, version from (select distinct name as status, version from "FOIMinistryRequests" fm inner join "FOIRequestStatuses" fs2 on fm.requeststatusid = fs2.requeststatusid
where foiministryrequestid=:ministryrequestid order by version asc) as fs3 order by version desc;
"""
sql = """select fm2.version, fs2."name" as status from "FOIMinistryRequests" fm2 inner join "FOIRequestStatuses" fs2 on fm2.requeststatusid = fs2.requeststatusid
sql = """select fm2.version, fs2."name" as status, fm2.created_at from "FOIMinistryRequests" fm2 inner join "FOIRequestStatuses" fs2 on fm2.requeststatusid = fs2.requeststatusid
where fm2.foiministryrequestid=:ministryrequestid order by version desc"""
rs = db.session.execute(text(sql), {'ministryrequestid': ministryrequestid})
_tmp_state = None
for row in rs:
if row["status"] != _tmp_state:
transitions.append({"status": row["status"], "version": row["version"]})
transitions.append({"status": row["status"], "version": row["version"], "created_at": row["created_at"]})
_tmp_state = row["status"]
except Exception as ex:
logging.error(ex)
Expand Down
Loading