From 81e5542e6cd17b4556cf9338f4648ad16b109775 Mon Sep 17 00:00:00 2001 From: Nazarii Date: Wed, 3 Jan 2024 15:19:22 +0200 Subject: [PATCH] bugfix --- .../migrations/0003_alter_action_action.py | 19 +++++++++++++++++++ web/user_profile/views.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 web/actions/migrations/0003_alter_action_action.py diff --git a/web/actions/migrations/0003_alter_action_action.py b/web/actions/migrations/0003_alter_action_action.py new file mode 100644 index 0000000..881dd67 --- /dev/null +++ b/web/actions/migrations/0003_alter_action_action.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.8 on 2024-01-03 11:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ('actions', '0002_alter_action_action'), + ] + + operations = [ + migrations.AlterField( + model_name='action', + name='action', + field=models.CharField( + choices=[('update_avatar', 'Update Avatar'), ('create_article', 'Create Article')], max_length=50 + ), + ), + ] diff --git a/web/user_profile/views.py b/web/user_profile/views.py index b0e987d..207f738 100644 --- a/web/user_profile/views.py +++ b/web/user_profile/views.py @@ -25,7 +25,7 @@ def get_serializer_class(self): return serializers.UserSerializer def get_object(self): - obj = UserQueryService.get_user_by_id(self.request.user.id) + obj = UserQueryService().get_user_by_id(self.request.user.id) self.check_object_permissions(self.request, obj) return obj