Fixed control page role changing
This commit is contained in:
parent
c7c019f70b
commit
17328650c8
@ -150,6 +150,8 @@ def update_role(user_profile: UserProfile, role: str) -> UserProfile:
|
|||||||
zendesk = ZendeskAdmin()
|
zendesk = ZendeskAdmin()
|
||||||
user = zendesk.get_user(user_profile.user.email)
|
user = zendesk.get_user(user_profile.user.email)
|
||||||
user.custom_role_id = role
|
user.custom_role_id = role
|
||||||
|
user_profile.custom_role_id = role
|
||||||
|
user_profile.save()
|
||||||
zendesk.admin.users.update(user)
|
zendesk.admin.users.update(user)
|
||||||
|
|
||||||
|
|
||||||
|
14
main/migrations/0016_merge_20210330_0043.py
Normal file
14
main/migrations/0016_merge_20210330_0043.py
Normal 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 = [
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user