Fixed control page role changing

This commit is contained in:
Timofey Mazurov 2021-03-30 00:45:32 +03:00
parent c7c019f70b
commit 17328650c8
2 changed files with 16 additions and 0 deletions

View File

@ -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)

View File

@ -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 = [
]