VOLTTRON / deprecated-volttron-applications

VOLTTRON Application tree (moved from volttron/applications)
BSD 3-Clause "New" or "Revised" License
7 stars 35 forks source link

'oadrRequestEventType' object has no attribute 'venID' #65

Open citizen-stig opened 5 years ago

citizen-stig commented 5 years ago

Simulation System for VEN gives following error when event to /OpenADR2/Simple/2.0b/EiEvent is sent:

[01/Jul/2019 17:29:06] "POST /OpenADR2/Simple/2.0b/EiEvent HTTP/1.1" 400 933

This is exception (manually):
'oadrRequestEventType' object has no attribute 'venID'

Line 436 in volttron-applications/kisensum/openadr/openadr/api/views.py

There's work around for that, change ven_id = request.data.oadrSignedObject.oadrRequestEvent.venID

with:

ven_id = request.data.oadrSignedObject.oadrRequestEvent.eiRequestEvent.venID

Could you please give more details if it is a bug or am I missing something in configuration.

rcalvert-cpi commented 5 years ago

Yes, that appears to be a bug, and I agree that your fix for it is correct. I encourage you to submit the change as a volttron-applications pull request. I can’t assure you that it will be accepted soon, though — there are 7 requests in the queue already, and it was 9 months ago when a pull request was last accepted for that repository.

craig8 commented 5 years ago

@rcalvert-cpi let me know when you have tested the bug fix when the pull request is done and I will gladly pull it it.

rcalvert-cpi commented 5 years ago

I sure will. Thanks, Craig! @citizen-stig, if you submit a pull request for this, would you please include a note to me in the comment, so that I'll receive a notification about it?