mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
Merge pull request #8471 from ryanpetrello/whoops-scm
fix a minor bug introduced in Project save validation Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -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 "local_path" in attrs and self.instance.local_path != attrs['local_path']:
|
||||
if self.instance and 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)
|
||||
|
||||
Reference in New Issue
Block a user