Ver código fonte

Improved default response from the oadrCreatedPartyRegistration placeholder

Signed-off-by: Stan Janssen <stan.janssen@elaad.nl>
Stan Janssen 4 anos atrás
pai
commit
b187e852ab
1 arquivos alterados com 4 adições e 1 exclusões
  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):