Filter distinct public keys only

This commit is contained in:
PCoder 2019-08-26 16:02:08 +05:30
parent 97d83abffe
commit 8b8c93d23e
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ def get_all_public_keys(customer):
:return: A list of public keys
"""
return UserHostingKey.objects.filter(user_id=customer.id).values_list(
"public_key", flat=True)
"public_key", flat=True).distinct()
def get_or_create_vm_detail(user, manager, vm_id):