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

[FIX] Grid page failing #4417

Merged
merged 1 commit into from
Aug 21, 2023
Merged

[FIX] Grid page failing #4417

merged 1 commit into from
Aug 21, 2023

Conversation

jpelay
Copy link
Member

@jpelay jpelay commented Aug 21, 2023

Classes with old programs were failing because some of them did not have the field adventure_name. This PR adds an if when retrieving programs that have this characteristic. It also deletes the debug prints that were added in #4416.

@Felienne
Copy link
Member

Thanks for the quick fix!!

@mergify
Copy link
Contributor

mergify bot commented Aug 21, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit e424fa3 into hedyorg:main Aug 21, 2023
8 checks passed
mergify bot pushed a commit that referenced this pull request Mar 1, 2024
#5197)

Same thing happened to us back in #4417. Some old programs don't have the field `adventure_name` in them, and thus our systems fails. I also improve a bit the filtering of programs, by not using the program name, but rather the adventure name.

I also have a question, what to do with programs that might have an id that's neither in the DB or our own contents? Right now, Im resorting to just show the id, but perhaps we should skip them? What do you think?

![image](https://github.com/hedyorg/hedy/assets/45865185/dd65b538-960d-40da-a02f-a2f4336daa7d)


**How to test**

Go to My Programs page, it should be working. 

If you want to see a program with a non-existing adventure linked, copy an existing `program` record in the dev_dabase.json and change the `adventure_name` field to something that's not present in the database.
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