Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing a bug with Ed-Fi 6.1 APIs dependencies #9

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

tomreitz
Copy link
Collaborator

@tomreitz tomreitz commented Jun 8, 2023

lightbeam uses the Ed-Fi API's dependencies endpoint to determine in which order to send resources. In Ed-Fi 5.1, this endpoint appears to have sorted resources in order. However E-d-Fi 6.1 produces the resources alphabetically. Moreover, it may show a resource twice (one with Create operation, another with Update operation), which caused lightbeam to send that resource twice.

This PR fixes this bug by filtering the list of resources returned by the dependencies endpoint to only those with a Create operation, and then sorting the resources according to the order property.

… not return resources in dependency order (requires sorting by an order property) and may contain duplicates of a given resource (one with Create operation, another with Update operation)
@tomreitz tomreitz requested a review from jayckaiser June 8, 2023 15:56
Copy link
Collaborator

@jayckaiser jayckaiser left a comment

Choose a reason for hiding this comment

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

I don't fully understand what the code is doing here or its motivations, but the Python is solid.

@tomreitz tomreitz merged commit d7c88bb into main Jun 13, 2023
@tomreitz tomreitz deleted the bugfix/edfi_6_1_dependencies branch June 13, 2023 18:51
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