Corrected filtering public ssh keys condition

This commit is contained in:
PCoder 2017-09-05 03:29:12 +05:30
parent a32bb9b774
commit dc6fa5428e

View file

@ -7,5 +7,5 @@ def get_all_public_keys(customer):
:param customer: The customer whose public keys are needed
:return: A list of public keys
"""
return UserHostingKey.objects.filter(
user__site__customuser=customer).values_list("public_key", flat=True)
return UserHostingKey.objects.filter(user_id=customer.id).values_list(
"public_key", flat=True)