Skip to content

Conversation

@Alec4r
Copy link
Contributor

@Alec4r Alec4r commented Dec 3, 2025

This PR introduces several improvements to the serializers used in the Corporate Partner Catalog workflow. These changes add new fields, improve nested data responses, and ensure consistent ordering for catalog courses.


✅ Changes Included

1. PartnerCatalogCourseSerializer Improvements

  • Added order (IntegerField, read-only) mapped from position.
  • Added course_key (SerializerMethodField) exposing course_overview.id.
  • Added ordering = ["position"] inside Meta to ensure consistent ordering.

2. PartnerCatalogSerializer Updates

  • Replaced PrimaryKeyRelatedField for partner with the full PartnerSerializer to return nested partner details.

  • Added steps using PartnerCatalogCourseSerializer (many=True, read-only).

  • Introduced new fields:

    • image = ImageField(read_only=True)
    • email_regexes = ListField(child=CharField(max_length=500))
  • Updated the fields and read_only_fields lists accordingly.

3. General Cleanup

  • Minor reordering for clarity and serializer structure consistency.

🎯 Motivation

  • Provide richer and more complete catalog data for the frontend.
  • Support UI features that require partner details, catalog steps, and additional metadata.
  • Improve payload consistency and ordering of catalog courses.

@Ang-m4 Ang-m4 force-pushed the dam/catalog_courses branch from 92fa078 to 94e39b4 Compare December 3, 2025 14:37
Copy link
Contributor

@Ang-m4 Ang-m4 left a comment

Choose a reason for hiding this comment

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

LGTM

@Ang-m4 Ang-m4 merged commit 5f3a2bf into main.v2 Dec 3, 2025
4 checks passed
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.

3 participants