fix: [vanity] length+1 min vanity = 2

dev
terrtia 2024-02-19 15:38:51 +01:00
parent 273e264659
commit 4c5a0b9906
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 2 additions and 1 deletions

View File

@ -685,6 +685,7 @@ def get_vanity_cluster(vanity, len_vanity=4, nb_min=4):
clusters[new_vanity] = 0
clusters[new_vanity] += 1
to_remove = []
print(clusters)
for new_vanity in clusters:
if clusters[new_vanity] < nb_min:
to_remove.append(new_vanity)

View File

@ -592,7 +592,7 @@ def domains_explorer_vanity_clusters():
@login_analyst
def domains_explorer_vanity_explore():
vanity = request.args.get('vanity')
nb_min = request.args.get('min', 4) # TODO SHOW DOMAINS OPTIONS + HARD CODED DOMAINS LIMIT FOR RENDER
nb_min = request.args.get('min', 2) # TODO SHOW DOMAINS OPTIONS + HARD CODED DOMAINS LIMIT FOR RENDER
length = len(vanity)
if int(nb_min) < 0:
nb_min = 4