Skip to content

Commit 61a6291

Browse files
committed
Correct behavior when receiving response to completed events
1 parent f16c72b commit 61a6291

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openleadr/service/event_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ async def request_event(self, payload):
4646
event_status = utils.getmember(event, 'event_descriptor.event_status')
4747
# Pop the event from the events so that this is the last time it is communicated
4848
if event_status == enums.EVENT_STATUS.COMPLETED:
49+
if ven_id not in self.completed_event_ids:
50+
self.completed_event_ids[ven_id] = []
51+
event_id = utils.getmember(event, 'event_descriptor.event_id')
52+
self.completed_event_ids[ven_id].append(event_id)
4953
self.events[ven_id].pop(self.events[ven_id].index(event))
5054
else:
5155
events = None

0 commit comments

Comments
 (0)