Sfoglia il codice sorgente

Make Request object optional in oadrDistributeEvent

Stan Janssen 4 anni fa
parent
commit
b12691aaca
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      openleadr/templates/oadrDistributeEvent.xml

+ 2 - 0
openleadr/templates/oadrDistributeEvent.xml

@@ -1,10 +1,12 @@
 <oadrSignedObject xmlns="http://openadr.org/oadr-2.0b/2012/07" id="oadrSignedObject">
   <oadrDistributeEvent ei:schemaVersion="2.0b" xmlns:ei="http://docs.oasis-open.org/ns/energyinterop/201110">
+    {% if response %}
     <ei:eiResponse>
       <ei:responseCode>{{ response.response_code }}</ei:responseCode>
       <ei:responseDescription>{{ response.response_description }}</ei:responseDescription>
       <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">{{ response.request_id }}</requestID>
     </ei:eiResponse>
+    {% endif %}
     <requestID xmlns="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">{{ request_id }}</requestID>
     <ei:vtnID>{{ vtn_id }}</ei:vtnID>
     {% for event in events %}