Skip to content

Commit

Permalink
Merge pull request #66 from citizen-stig/citizen-stig-patch-for-issue-65
Browse files Browse the repository at this point in the history
Fix object has no attribute 'venID'
  • Loading branch information
rlutes authored Feb 7, 2020
2 parents 8a76c8c + ea0f44e commit 71cee5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kisensum/openadr/openadr/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def post(self, request, format=None):
# IS THIS A REQUEST EVENT?
if request.data.oadrSignedObject.oadrRequestEvent is not None:
try:
ven_id = request.data.oadrSignedObject.oadrRequestEvent.venID
ven_id = request.data.oadrSignedObject.oadrRequestEvent.eiRequestEvent.venID

site_events = SiteEvent.objects.filter(site__ven_id=ven_id,
dr_event__scheduled_notification_time__lt=timezone.now()) \
Expand Down Expand Up @@ -531,4 +531,4 @@ def post(self, request, format=None):
BOGUS_REQUEST_ID,
response_description)
payload_xml = payload_response.wrap()
return Response({'result' : payload_xml}, content_type='application/xml', status=status.HTTP_204_NO_CONTENT)
return Response({'result' : payload_xml}, content_type='application/xml', status=status.HTTP_204_NO_CONTENT)

0 comments on commit 71cee5e

Please sign in to comment.