-
Notifications
You must be signed in to change notification settings - Fork 2
✨(backend) bind course offer into course webhook payload #1079
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
Conversation
d8ef298 to
3bf964d
Compare
c199330 to
babf6b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates course offer information into the course webhook payload and updates the synchronization logic for certificate products. It also adds new tests to validate the offer logic for different product types and updates JSON serialization and signal handling accordingly.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/backend/joanie/tests/core/test_signals.py | Updated tests for certificate and credential product synchronization. |
| src/backend/joanie/tests/core/test_models_product.py | Added tests for offer processing in course run data and serialization. |
| src/backend/joanie/tests/core/test_models_course_run.py | Extended course run tests to validate certificate offer behavior. |
| src/backend/joanie/core/utils/webhooks.py | Modified JSON serialization and added explicit Content-Type header. |
| src/backend/joanie/core/signals.py | Enhanced signal handlers to support certificate-specific course run sync. |
| src/backend/joanie/core/models/products.py | Introduced get_equivalent_course_run_offer and get_serialized_certificated_course_runs. |
| src/backend/joanie/core/models/courses.py | Updated course serialization to include certificate offer and added get_certificate_offer. |
| src/backend/joanie/core/enums.py | Added new constants for course offers. |
| src/backend/joanie/core/apps.py | Registered new signal handler for product save. |
| CHANGELOG.md | Documented the inclusion of course offer information in webhook payload. |
From Richie we recently add new fields to CourseRun models to set offer available on the CourseRun. As in Joanie we are able to set the course run offer according to product linked to the related course, we update the course synchronization to add this information.
babf6b7 to
ddb2bf5
Compare
Purpose
From Richie we recently add new fields to CourseRun models to set offer available on the CourseRun. As in Joanie we are able to set the course run offer according to product linked to the related course, we update the course synchronization to add this information.