Skip to content

Commit

Permalink
Merge pull request #923 from maykinmedia/issue/1971-check-current-sta…
Browse files Browse the repository at this point in the history
…tus-for-eindstatus

[#1971] Double-check if our current status is an eindstatus due to eS…
  • Loading branch information
alextreme authored Jan 4, 2024
2 parents a33049f + 2bfc809 commit 6df0bf0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/open_inwoner/cms/cases/views/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ def get_context_data(self, **kwargs):
# The end status data is not passed if the end status has been reached,
# because in that case the end status data is already included in `statuses`
end_statustype = next((s for s in statustypen if s.is_eindstatus), None)
# The following check is a eSuite-specific workaround to deal with multiple statustypes per zaaktype having isEindstatus: true
# In the case when we have reached a statustype with isEindstatus set we assume this is our eindstatus
if (
statuses
and statuses[-1].statustype
and statuses[-1].statustype.is_eindstatus
):
end_statustype = statuses[-1].statustype

end_statustype_data = None
if not status_types.get(end_statustype.url):
end_statustype_data = {
Expand Down

0 comments on commit 6df0bf0

Please sign in to comment.