mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Skip SCM URL validation for projects without SCM.
This commit is contained in:
@@ -308,6 +308,8 @@ class ProjectSerializer(BaseSerializer):
|
|||||||
scm_username = attrs.get('scm_username', '') or ''
|
scm_username = attrs.get('scm_username', '') or ''
|
||||||
scm_password = attrs.get('scm_password', '') or ''
|
scm_password = attrs.get('scm_password', '') or ''
|
||||||
scm_url = unicode(attrs.get(source, None) or '')
|
scm_url = unicode(attrs.get(source, None) or '')
|
||||||
|
if not scm_type:
|
||||||
|
return attrs
|
||||||
try:
|
try:
|
||||||
if scm_username and scm_password:
|
if scm_username and scm_password:
|
||||||
scm_url = update_scm_url(scm_type, scm_url, scm_username,
|
scm_url = update_scm_url(scm_type, scm_url, scm_username,
|
||||||
|
|||||||
Reference in New Issue
Block a user