mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-25 01:11:48 -05:00
enforce a stable list order when attaching/detaching instance groups
This commit is contained in:
@@ -38,6 +38,7 @@ from awx.main.fields import (
|
||||
ImplicitRoleField,
|
||||
JSONBField,
|
||||
SmartFilterField,
|
||||
OrderedManyToManyField,
|
||||
)
|
||||
from awx.main.managers import HostManager
|
||||
from awx.main.models.base import (
|
||||
@@ -157,9 +158,10 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin, RelatedJobsMixin):
|
||||
default=None,
|
||||
help_text=_('Filter that will be applied to the hosts of this inventory.'),
|
||||
)
|
||||
instance_groups = models.ManyToManyField(
|
||||
instance_groups = OrderedManyToManyField(
|
||||
'InstanceGroup',
|
||||
blank=True,
|
||||
through='InventoryInstanceGroupMembership',
|
||||
)
|
||||
admin_role = ImplicitRoleField(
|
||||
parent_role='organization.inventory_admin_role',
|
||||
|
||||
Reference in New Issue
Block a user