Conversation
Collaborator
|
Please check if you can use a migration to fix stored data rather than normalize on every read |
its-gabo
force-pushed
the
gs_fix_sharing_course_failing_and_showing_wrong_author
branch
from
September 17, 2026 07:58
ceef927 to
c480b73
Compare
Japrolol
approved these changes
Sep 17, 2026
|
|
||
| async findCategoryByLocalizedTitle(title: string) { | ||
| const [existingCategory] = await this.db | ||
| .select(getTableColumns(categories)) |
Collaborator
There was a problem hiding this comment.
Suggested change
| .select(getTableColumns(categories)) | |
| .select() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes course sharing failures when a target tenant already contains a matching category under a different locale.
Also ensures shared courses display the original source-course author instead of the local target-tenant user assigned as the technical course owner. The export snapshot now normalizes author metadata, fills missing metadata from the source author, and supports existing exported courses whose metadata was stored as a double-encoded JSONB string.
The master-course E2E coverage now verifies that:
/api/course/allresponse displays the source author;Business Value
Administrators can reliably share courses between tenants without exports failing because of localized category differences. Recipients also see the actual course author across course listings instead of an unrelated administrator from their own tenant, preserving correct attribution and avoiding confusion.