From abd0eb53bfe9f9c3aaaf55cabe2e5f99d7917612 Mon Sep 17 00:00:00 2001 From: Jake Jackson Date: Tue, 27 Oct 2020 00:39:51 -0400 Subject: [PATCH] fix tests --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 497eb1952e..74f78eff85 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1333,7 +1333,7 @@ class ProjectOptionsSerializer(BaseSerializer): scm_type = attrs.get('scm_type', u'') or u'' if self.instance and not scm_type: valid_local_paths.append(self.instance.local_path) - if scm_type and self.instance.local_path != attrs.get('local_path'): + if scm_type and "local_path" in attrs and self.instance.local_path != attrs['local_path']: errors['local_path'] = _(f'Cannot change local_path for {scm_type}-based projects') if scm_type: attrs.pop('local_path', None)