From 17328650c8aeb68ce8268208a88a33055fceb255 Mon Sep 17 00:00:00 2001 From: Timofey Mazurov Date: Tue, 30 Mar 2021 00:45:32 +0300 Subject: [PATCH] Fixed control page role changing --- main/extra_func.py | 2 ++ main/migrations/0016_merge_20210330_0043.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 main/migrations/0016_merge_20210330_0043.py diff --git a/main/extra_func.py b/main/extra_func.py index b87ac27..077615f 100644 --- a/main/extra_func.py +++ b/main/extra_func.py @@ -150,6 +150,8 @@ def update_role(user_profile: UserProfile, role: str) -> UserProfile: zendesk = ZendeskAdmin() user = zendesk.get_user(user_profile.user.email) user.custom_role_id = role + user_profile.custom_role_id = role + user_profile.save() zendesk.admin.users.update(user) diff --git a/main/migrations/0016_merge_20210330_0043.py b/main/migrations/0016_merge_20210330_0043.py new file mode 100644 index 0000000..efb1d45 --- /dev/null +++ b/main/migrations/0016_merge_20210330_0043.py @@ -0,0 +1,14 @@ +# Generated by Django 3.1.6 on 2021-03-29 21:43 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0015_auto_20210330_0007'), + ('main', '0015_auto_20210321_1600'), + ] + + operations = [ + ]