Преглед на файлове

Improved default response from the oadrCreatedPartyRegistration placeholder

Signed-off-by: Stan Janssen <stan.janssen@elaad.nl>
Stan Janssen преди 4 години
родител
ревизия
b187e852ab
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  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):