From c1b017201165588c46075b28b5f8ccf236048ae7 Mon Sep 17 00:00:00 2001 From: mahdavi Date: Mon, 22 Jul 2024 17:39:40 +0330 Subject: [PATCH] return name in application serializer --- apps/gooyal_oauth2/models.py | 1 - apps/gooyal_oauth2/serializers.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gooyal_oauth2/models.py b/apps/gooyal_oauth2/models.py index 59b3512..b37263c 100644 --- a/apps/gooyal_oauth2/models.py +++ b/apps/gooyal_oauth2/models.py @@ -31,7 +31,6 @@ class Application(AbstractApplication): id=None uuid = models.UUIDField(primary_key=True, editable=False, default=uuid.uuid4, unique=True, db_index=True) - # TODO: change it to owner user = models.ForeignKey( settings.AUTH_USER_MODEL, related_name="%(app_label)s_%(class)s", diff --git a/apps/gooyal_oauth2/serializers.py b/apps/gooyal_oauth2/serializers.py index 285d78f..bfa5621 100755 --- a/apps/gooyal_oauth2/serializers.py +++ b/apps/gooyal_oauth2/serializers.py @@ -6,6 +6,7 @@ class ApplicationSerializer(serializers.ModelSerializer): class Meta: model = Application fields = ('uuid', + 'name', 'client_id', 'user', 'allowed_scope',