improved error handling
This commit is contained in:
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()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user