Skip to content

Conversation

tvararu
Copy link
Member

@tvararu tvararu commented Aug 19, 2024

Use import! which causes the import to fail if any locations don't pass validations.

The GIAS CSV contains some school addresses that don't have a protocol. As such, they are not valid URLs according to validate_url.

To work around this, we can force prepend https://, which assumes that the school websites have HTTPS setup. This isn't a given, but it feels like the better default, since HTTPS is pretty strongly pushed by browser vendors.

The URL for Legh Vale Primary School is also malformed and starts with http:www. It's the only instance of this, but we have to work around it.

This ensures that the import breaks if it encounters validation errors.
The GIAS CSV contains some school addresses that don't have a protocol.
As such, they are not valid URLs according to validate_url.

To work around this, we can force prepend `https://`, which assumes that
the school websites have HTTPS setup. This isn't a given, but it feels
like the better default, since HTTPS is pretty strongly pushed by
browser vendors.

The URL for Legh Vale Primary School is also plainly malformed and
starts with `http:www`. It's the only instance of this, but we have to
work around it.
@tvararu tvararu requested a review from a team as a code owner August 19, 2024 19:13
@tvararu tvararu temporarily deployed to mavis-pr-1635 August 19, 2024 19:16 Inactive
@tvararu tvararu merged commit 22eff2d into main Aug 19, 2024
@tvararu tvararu deleted the schools-import branch August 19, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants