mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
better insights_credential reverse relationship
* From an insights cred, access all related inventories via cred.insights_inventories rather than cred.insights_credential * This fixes auto-attaching insights_credential to credential summary fields. Fixes by NOT attaching them. That is the desired behavior.
This commit is contained in:
@@ -146,7 +146,7 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin):
|
||||
])
|
||||
insights_credential = models.ForeignKey(
|
||||
'Credential',
|
||||
related_name='insights_credential',
|
||||
related_name='insights_inventories',
|
||||
help_text=_('Credentials to be used by hosts belonging to this inventory when accessing Red Hat Insights API.'),
|
||||
on_delete=models.SET_NULL,
|
||||
blank=True,
|
||||
|
||||
Reference in New Issue
Block a user