mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 21:07:39 -02:30
Merge pull request #3842 from ryanpetrello/instance-group-order
enforce a stable list order when attaching/detaching instance groups Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -37,6 +37,7 @@ from awx.main.fields import (
|
||||
ImplicitRoleField,
|
||||
JSONBField,
|
||||
SmartFilterField,
|
||||
OrderedManyToManyField,
|
||||
)
|
||||
from awx.main.managers import HostManager
|
||||
from awx.main.models.base import (
|
||||
@@ -156,9 +157,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