NotificationCategoryChoices error

This commit is contained in:
rizwanisready
2024-05-08 13:22:05 +05:30
parent 33d513a7b5
commit 4c71e5ef77
2 changed files with 3 additions and 1 deletions

View File

@@ -606,6 +606,8 @@ class EventFilterByLocationAPIView(APIView):
user_location = IAmPrincipalLocation.objects.filter(
principal=principal
).last()
print("user_location: ", user_location)
print("principal_user_location: ", user_location.principal)
user_lat = user_location.latitude
user_lon = user_location.longitude
except IAmPrincipalLocation.DoesNotExist:

View File

@@ -68,7 +68,7 @@ class InAppNotification(BaseModel):
message = models.TextField()
notification_category = models.CharField(
max_length=50,
choices=NotificationCategoryChoices.choices,
choices=[(choice.value, choice.label) for choice in NotificationCategoryChoices],
)
def __str__(self):