Merge pull request #1164 from AlanCoding/path_words

Add verbosity to local_path error
This commit is contained in:
Alan Rominger 2018-03-29 11:58:39 -04:00 committed by GitHub
commit 05a56b9b22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1345,7 +1345,7 @@ class ProjectOptionsSerializer(BaseSerializer):
if scm_type:
attrs.pop('local_path', None)
if 'local_path' in attrs and attrs['local_path'] not in valid_local_paths:
errors['local_path'] = 'Invalid path choice.'
errors['local_path'] = _('This path is already being used by another manual project.')
if errors:
raise serializers.ValidationError(errors)