@@ -262,6 +262,9 @@ def generate_party(self, contact: dict,
262
262
organization_name = get_charstring (contact .get ('organization' ),
263
263
self .lang1 , self .lang2 )
264
264
265
+ individual_name = get_charstring (contact .get ('individualname' ),
266
+ self .lang1 , self .lang2 )
267
+
265
268
position_name = get_charstring (contact .get ('positionname' ),
266
269
self .lang1 , self .lang2 )
267
270
@@ -290,14 +293,14 @@ def generate_party(self, contact: dict,
290
293
'roles' : []
291
294
}
292
295
293
- if organization_name [0 ] == contact . get ( 'organization' ) :
294
- LOGGER . debug ( 'Contact name is organization')
295
- rp [ 'name' ] = organization_name [ 0 ]
296
-
296
+ if organization_name [0 ] is not None :
297
+ rp [ ' organization'] = organization_name [ 0 ]
298
+ if individual_name [ 0 ] is not None :
299
+ rp [ 'name' ] = individual_name [ 0 ]
297
300
if position_name [0 ] is not None :
298
- rp ['positionName ' ] = position_name [0 ]
301
+ rp ['position ' ] = position_name [0 ]
299
302
if hours_of_service [0 ] is not None :
300
- rp ['positionName ' ] = hours_of_service [0 ]
303
+ rp ['hoursOfService ' ] = hours_of_service [0 ]
301
304
if contact_instructions [0 ] is not None :
302
305
rp ['contactInstructions' ] = contact_instructions [0 ]
303
306
@@ -319,6 +322,7 @@ def generate_party(self, contact: dict,
319
322
phone = phone .replace ('+0' , '+' ).replace (' ' , '' )
320
323
321
324
rp ['phones' ] = [{'value' : phone }]
325
+
322
326
if contact .get ('email' ) is not None :
323
327
rp ['emails' ] = [{'value' : contact .get ('email' )}]
324
328
0 commit comments