diff --git a/apps/ops/migrations/0025_auto_20230117_1130.py b/apps/ops/migrations/0025_auto_20230117_1130.py index b6d3881e7..7a5aa33b8 100644 --- a/apps/ops/migrations/0025_auto_20230117_1130.py +++ b/apps/ops/migrations/0025_auto_20230117_1130.py @@ -13,7 +13,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='playbook', name='create_method', - field=models.CharField(choices=[('blank', 'Blank'), ('upload', 'Upload'), ('vcs', 'VCS')], default='blank', max_length=128, verbose_name='CreateMethod'), + field=models.CharField(choices=[('blank', 'Blank'), ('vcs', 'VCS')], default='blank', max_length=128, verbose_name='CreateMethod'), ), migrations.AddField( model_name='playbook', diff --git a/apps/rbac/api/role.py b/apps/rbac/api/role.py index 0a4d52706..255299516 100644 --- a/apps/rbac/api/role.py +++ b/apps/rbac/api/role.py @@ -4,7 +4,6 @@ from rest_framework.exceptions import PermissionDenied from rest_framework.decorators import action from common.api import JMSModelViewSet -from common.api import PaginatedResponseMixin from ..filters import RoleFilter from ..serializers import RoleSerializer, RoleUserSerializer from ..models import Role, SystemRole, OrgRole diff --git a/apps/rbac/migrations/0012_alter_role_options.py b/apps/rbac/migrations/0012_alter_role_options.py new file mode 100644 index 000000000..ba98b699e --- /dev/null +++ b/apps/rbac/migrations/0012_alter_role_options.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.16 on 2023-02-02 08:03 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('rbac', '0011_remove_redundant_permission'), + ] + + operations = [ + migrations.AlterModelOptions( + name='role', + options={'ordering': ('scope', 'name'), 'verbose_name': 'Role'}, + ), + ] diff --git a/apps/rbac/models/role.py b/apps/rbac/models/role.py index 1eff7c15c..e5a18b5e6 100644 --- a/apps/rbac/models/role.py +++ b/apps/rbac/models/role.py @@ -43,6 +43,7 @@ class Role(JMSBaseModel): class Meta: unique_together = [('name', 'scope')] + ordering = ('scope', 'name') verbose_name = _('Role') def __str__(self):