Skip to content

fix vista_systems (odeon and curzon) updating API#31

Open
davidferguson wants to merge 1 commit intomasterfrom
fix-vista_system-api_update
Open

fix vista_systems (odeon and curzon) updating API#31
davidferguson wants to merge 1 commit intomasterfrom
fix-vista_system-api_update

Conversation

@davidferguson
Copy link
Copy Markdown
Owner

Vista Systems has undergone a API change, breaking Odeon and Curzon. This PR updates the archiver for Vista to accommodate this change.

@andrewferguson andrewferguson added the hacktoberfest-accepted Accepted as a valid PR for Hacktoberfest label Oct 30, 2022
Copy link
Copy Markdown
Collaborator

@andrewferguson andrewferguson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has fixed the issue with the changes to the API. Aside from my one concern about a possible place that could easily crash, this looks OK.

Comment on lines +119 to +121
for site in sites_data['sites']:
site_query += SHOWINGS_SITE_QUERY.format(site_id=site['id'])
return site_query[:-1]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern here is that if there are no sites, then site_query will be empty, so attempting to access site_query[:-1] will fail. Is this something we want to account for, or is that error acceptable as a sign of a change in the API?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's an acceptable error - no cinema will have no sites (unless it's shut).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Accepted as a valid PR for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants