Pārlūkot izejas kodu

See if there are changes to the data

ogert 4 gadi atpakaļ
vecāks
revīzija
f31d83ba24
1 mainītis faili ar 8 papildinājumiem un 6 dzēšanām
  1. 8 6
      cdplib/db_migration/DataFrameToCollection.py

+ 8 - 6
cdplib/db_migration/DataFrameToCollection.py

@@ -274,16 +274,18 @@ class DataFrameToCollection():
             
     
         if x.size == 1:
-            return_value = x.tolist()
+            uniques = x.tolist()
+            '''
             if return_value == [{}]:
                 return []
             return return_value
-        
+            '''
+        else:
 
-        uniques = pd.DataFrame({"temp": x.values})\
-                    .assign(temp_str=lambda y: y["temp"].astype(np.str))\
-                    .drop_duplicates(subset=["temp_str"])\
-                    .drop("temp_str", axis=1).iloc[:, 0].tolist()
+            uniques = pd.DataFrame({"temp": x.values})\
+                        .assign(temp_str=lambda y: y["temp"].astype(np.str))\
+                        .drop_duplicates(subset=["temp_str"])\
+                        .drop("temp_str", axis=1).iloc[:, 0].tolist()
         
     
         def is_empty(y):