Jelajahi Sumber

Improved default response from the oadrCreatedPartyRegistration placeholder

Signed-off-by: Stan Janssen <stan.janssen@elaad.nl>
Stan Janssen 4 tahun lalu
induk
melakukan
b187e852ab
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  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):