From 5807632ee45a807dedc53d5e3afa78ed6805440d Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Fri, 16 Dec 2022 11:40:24 +0530 Subject: [PATCH 1/2] feat: add field my_issues_prop to store my_issues property --- apiserver/plane/api/views/people.py | 1 - apiserver/plane/db/models/user.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/apiserver/plane/api/views/people.py b/apiserver/plane/api/views/people.py index 1612e0bc7..81118484c 100644 --- a/apiserver/plane/api/views/people.py +++ b/apiserver/plane/api/views/people.py @@ -52,7 +52,6 @@ class PeopleEndpoint(BaseAPIView): class UserEndpoint(BaseViewSet): serializer_class = UserSerializer model = User - serializers = {} def get_object(self): return self.request.user diff --git a/apiserver/plane/db/models/user.py b/apiserver/plane/db/models/user.py index 7efa4be49..1b08c8d69 100644 --- a/apiserver/plane/db/models/user.py +++ b/apiserver/plane/db/models/user.py @@ -66,6 +66,7 @@ class User(AbstractBaseUser, PermissionsMixin): last_login_uagent = models.TextField(blank=True) token_updated_at = models.DateTimeField(null=True) last_workspace_id = models.UUIDField(null=True) + my_issues_prop = models.JSONField(null=True) USERNAME_FIELD = "email" From 602aa30f5891bb51c4886a87c8ed4251f59e16fb Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Tue, 20 Dec 2022 15:19:09 +0530 Subject: [PATCH 2/2] dev: add migration files --- .../db/migrations/0012_user_my_issues_prop.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 apiserver/plane/db/migrations/0012_user_my_issues_prop.py diff --git a/apiserver/plane/db/migrations/0012_user_my_issues_prop.py b/apiserver/plane/db/migrations/0012_user_my_issues_prop.py new file mode 100644 index 000000000..96c8a33c1 --- /dev/null +++ b/apiserver/plane/db/migrations/0012_user_my_issues_prop.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2022-12-20 09:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('db', '0011_auto_20221216_0259'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='my_issues_prop', + field=models.JSONField(null=True), + ), + ]