mirror of
https://github.com/ansible/awx.git
synced 2026-08-02 19:10:00 -02:30
Dropped stored role name/description and other superflous fields
For name and description, we'll derive these from the role_field and content type, which is much better for lots of reasons (eg changing text the future). Also ditched the rest of the fields comming from the standard common base model, we didn't use them and they cost several indexes on the table.
This commit is contained in:
@@ -127,11 +127,10 @@ def create_user_role(instance, **kwargs):
|
||||
Role.objects.get(
|
||||
content_type=ContentType.objects.get_for_model(instance),
|
||||
object_id=instance.id,
|
||||
name = 'User Admin'
|
||||
role_field='admin_role'
|
||||
)
|
||||
except Role.DoesNotExist:
|
||||
role = Role.objects.create(
|
||||
name = 'User Admin',
|
||||
role_field='admin_role',
|
||||
content_object = instance,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user