Explorar el Código

Improved default response from the oadrCreatedPartyRegistration placeholder

Signed-off-by: Stan Janssen <stan.janssen@elaad.nl>
Stan Janssen hace 4 años
padre
commit
b187e852ab
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      openleadr/service/registration_service.py

+ 4 - 1
openleadr/service/registration_service.py

@@ -109,7 +109,10 @@ class RegistrationService(VTNService):
                                                   'transports': transports}],
                                     'requested_oadr_poll_freq': self.poll_freq}
         else:
-            response_payload = {}
+            transports = [{'transport_name': payload['transport_name']}]
+            response_payload = {'profiles': [{'profile_name': payload['profile_name'],
+                                              'transports': transports}],
+                                'requested_oadr_poll_freq': self.poll_freq}
         return 'oadrCreatedPartyRegistration', response_payload
 
     def on_create_party_registration(self, payload):