Merge pull request #6120 from AlanCoding/ansible-inventory

Inventory updates through `ansible-inventory`
This commit is contained in:
Alan Rominger
2017-05-02 16:19:58 -04:00
committed by GitHub
20 changed files with 1232 additions and 2057 deletions

View File

@@ -2363,7 +2363,7 @@ class InventorySourceUpdateView(RetrieveAPIView):
def post(self, request, *args, **kwargs):
obj = self.get_object()
if obj.source == 'file' and obj.scm_project_id is not None:
if obj.source == 'scm':
raise PermissionDenied(detail=_(
'Update the project `{}` in order to update this inventory source.'.format(
obj.scm_project.name)))