From b936d4e3bc550e4b44ddd33a5cb74b9e6d50d905 Mon Sep 17 00:00:00 2001 From: Szabo Zoltan Date: Tue, 20 Jan 2026 12:34:42 +0100 Subject: [PATCH] ProfileSerializer to accept Country id --- api/serializers.py | 4 +++- assets | 2 +- notifications/admin.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/serializers.py b/api/serializers.py index cd0ba0d73..8a6b08e91 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -1701,12 +1701,14 @@ def validate_document(self, document): class ProfileSerializer(ModelSerializer): - country = MiniCountrySerializer() + country = serializers.PrimaryKeyRelatedField(queryset=Country.objects.all()) + country_details = MiniCountrySerializer(source="country", read_only=True) class Meta: model = Profile fields = ( "country", + "country_details", "org", "org_type", "city", diff --git a/assets b/assets index a53b60574..55970a430 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit a53b605748bba93db037c4a4e8df0a9153a7cc41 +Subproject commit 55970a43082bc03dbd6862028bd4b026e76ace45 diff --git a/notifications/admin.py b/notifications/admin.py index 71ad1d475..448cb0a28 100644 --- a/notifications/admin.py +++ b/notifications/admin.py @@ -28,7 +28,7 @@ def std(self, obj): class SubscriptionAdmin(CompareVersionAdmin): - search_fields = ("user__username", "rtype") + search_fields = ("user__email", "user__username", "rtype") list_filter = (("rtype", ChoiceDropdownFilter),) def get_queryset(self, request):