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

Sync from dev. #5011

Merged
merged 1 commit into from
Jan 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
6 changes: 4 additions & 2 deletions request-management-api/request_api/services/events/oipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ class oipcevent:
""" FOI OIPC Event management service
"""

def createoipcevent(self, requestid, userid):
def createoipcevent(self, requestid, requesttype, userid):
if requesttype != "ministryrequest":
return DefaultMethodResult(True,'No change',requestid)
ministryrequest = FOIMinistryRequest.getmetadata(requestid)
if ministryrequest["isoipcreview"] in (None, False):
notificationservice().dismissnotifications_by_requestid_type(requestid, "ministryrequest", self.__notificationtype())
return DefaultMethodResult(True,'No change',requestid)
return DefaultMethodResult(True,'Dismiss OIPC events',requestid)
inquiryoutcomes = oipcservice().getinquiryoutcomes()
version = ministryrequest["version"]
curoipcs = FOIRequestOIPC.getoipc(requestid, version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def posteventsync(self, requestid, requesttype, userid, username, isministryuser
stateeventresponse = stateevent().createstatetransitionevent(requestid, requesttype, userid, username)
divisioneventresponse = divisionevent().createdivisionevent(requestid, requesttype, userid)
assignmentresponse = assignmentevent().createassignmentevent(requestid, requesttype, userid, isministryuser,assigneename,username)
oipcresponse = oipcevent().createoipcevent(requestid, userid)
oipcresponse = oipcevent().createoipcevent(requestid, requesttype, userid)
if stateeventresponse.success == False or divisioneventresponse.success == False or assignmentresponse.success == False or oipcresponse.success == False:
current_app.logger.error("FOI Notification failed for event for request= %s ; state response=%s ; division response=%s ; assignment response=%s ; oipc response=%s" % (requestid, stateeventresponse.message, divisioneventresponse.message, assignmentresponse.message, oipcresponse.message))
except BusinessException as exception:
Expand Down
Loading