mirror of
https://github.com/ansible/awx.git
synced 2026-09-16 17:00:12 -02:30
AC-1122 Fixed inventory source name (and therefore inventory update name) to pull from group/inventory name.
This commit is contained in:
@@ -25,11 +25,11 @@ class Migration(DataMigration):
|
||||
if hasattr(instance, 'name'):
|
||||
d['name'] = instance.name
|
||||
elif getattr(instance, 'inventory', None) and getattr(instance, 'group', None):
|
||||
d['name'] = ': '.join([instance.inventory.name, instance.group.name])
|
||||
d['name'] = '%s (%s)'.join([instance.group.name, instance.inventory.name])
|
||||
elif getattr(instance, 'inventory', None):
|
||||
d['name'] = u'%s-%s' % (instance.inventory.name, instance.pk)
|
||||
d['name'] = u'%s (%s)' % (instance.inventory.name, instance.pk)
|
||||
else:
|
||||
d['name'] = u'%s-%s' % (instance._meta.verbose_name, instance.pk)
|
||||
d['name'] = u'%s (%s)' % (instance._meta.verbose_name, instance.pk)
|
||||
return d
|
||||
|
||||
def _get_dict_from_common_task_model(self, instance):
|
||||
|
||||
Reference in New Issue
Block a user