1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix validation of DataSource URL

This commit is contained in:
jeremystretch
2023-04-17 16:00:35 -04:00
parent 9ef1fb1e3a
commit 86d185fe05

View File

@ -113,7 +113,7 @@ class DataSource(JobsMixin, PrimaryModel):
# Ensure URL scheme matches selected type
if self.type == DataSourceTypeChoices.LOCAL and self.url_scheme not in ('file', ''):
raise ValidationError({
'url': f"URLs for local sources must start with file:// (or omit the scheme)"
'source_url': f"URLs for local sources must start with file:// (or specify no scheme)"
})
def enqueue_sync_job(self, request):