improved error handling

This commit is contained in:
Helldragon67 2024-12-04 18:49:39 +01:00
parent 7f77ecab04
commit fdb5f34e26

@ -70,6 +70,10 @@ class ShoppingManager:
# First generate the clusters # First generate the clusters
self.generate_clusters() self.generate_clusters()
# Return empty list if no clusters were found
if len(set(self.cluster_labels)) == 0 :
return []
# Then generate the shopping locations # Then generate the shopping locations
self.generate_shopping_locations() self.generate_shopping_locations()