Displaying differences for changeset
 
display as  

services.py

@@ -617,14 +617,18 @@
                         parm_cd_303d = None
                         currentUnits = None
                         for key, parmDict in wq_303d.items():
-                            checkName = parmDict["cdpheDownloadName"] # either a single string, or a list of strings
+                            checkName = parmDict["cdpheDownloadName"] # either a None, a single string, or a list of strings
                             if isinstance(checkName, list):
                                 # if this is a list, lowercase each element in the list so the 'in' operation still works to compare
                                 checkName = []
                                 for item in parmDict["cdpheDownloadName"]:
                                     checkName.append(item.lower())
+                            elif isinstance(checkName, str):
+                                # if this is a string, lowercase it
+                                checkName = checkName.lower()
                             else:
-                                checkName = checkName.lower()
+                                # Cache for some that have a None (not a string or list of strings) and lets just convert this to an empty string for 'in' comparison
+                                checkName = ""
                             if line["ana"].lower() in checkName: # either a single string, or a list of strings
                                 parm_cd_303d = key
                                 currentUnits = parmDict["expectedUnits"]