Update UserCardDetail get method

This commit is contained in:
PCoder 2018-07-05 09:58:57 +02:00
parent faa0604fae
commit 9035f98060

View file

@ -347,7 +347,7 @@ class UserCardDetail(AssignPermissionsMixin, models.Model):
:param stripe_customer:
:param card_details:
:return: The UserCardDetails object if it exists, False otherwise
:return: The UserCardDetails object if it exists, None otherwise
"""
try:
ucd = UserCardDetail.objects.get(
@ -358,4 +358,4 @@ class UserCardDetail(AssignPermissionsMixin, models.Model):
)
return ucd
except UserCardDetail.DoesNotExist:
return False
return None