alias filters by credential to credentials

This commit is contained in:
AlanCoding 2018-02-21 14:57:26 -05:00
parent 88b67c894c
commit 91e59ebd29
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -276,7 +276,7 @@ class FieldLookupBackend(BaseFilterBackend):
# TODO: remove after API v1 deprecation period
if queryset.model._meta.object_name in ('JobTemplate', 'Job') and key in (
'credential', 'vault_credential', 'cloud_credential', 'network_credential'
):
) or queryset.model._meta.object_name in ('InventorySource', 'InventoryUpdate') and key == 'credential':
key = 'credentials'
# Make legacy v1 Credential fields work for backwards compatability