File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
lambdas/recordforwarder/src/service Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1212
1313def uplift_legacy_identifier (immunization : dict ):
1414 # This code the above constants can be safely removed once DPS carries out it's data migration to update legacy
15- # identifiers as it will become redundant. Please see issue VED-904 for more information.
16- identifier_system = immunization ["identifier" ][0 ]["system" ]
15+ # identifiers as it should become redundant. However, it may be worth keeping in case legacy format identifiers are
16+ # received for some reason. Please see issue VED-904 for more information.
17+ identifier = immunization .get ("identifier" )
18+
19+ if identifier is None or len (identifier ) == 0 :
20+ # Return here to allow validation to raise appropriate error
21+ return
22+
23+ identifier_system = immunization .get ("identifier" )[0 ].get ("system" )
1724
1825 if identifier_system == TPP_V2_SUPPLIER_IDENTIFIER_SYSTEM :
1926 immunization ["identifier" ][0 ]["system" ] = TPP_V5_SUPPLIER_IDENTIFIER_SYSTEM
You can’t perform that action at this time.
0 commit comments