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

Unit cloning fails when the destination is a stand alone unit and has reference guides to be cloned #58686

Merged
merged 3 commits into from
May 21, 2024

Conversation

vijayamanohararaj
Copy link
Contributor

@vijayamanohararaj vijayamanohararaj commented May 16, 2024

Issue: When a unit is cloned and the destination is a standalone unit, the cloning script fails with a null reference exception at the step of cloning reference guides.

Root cause: The cloning step assumes that the destination unit is part of a unit group. As part of cloning reference guides, the course version is accessed through the unit group, which is null in case of standalone courses.

Fix: Leverage an already existing in-built function that has logic to determine course version for both stand alone and units that are part of unit groups.

Links

JIRA: https://codedotorg.atlassian.net/browse/TEACH-1109

Testing story

Added unit tests and drone

Deployment strategy

Regular DTP

Follow-up work

None

Privacy

N/A

Security

N/A

Caching

N/A

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@vijayamanohararaj vijayamanohararaj changed the title Unit tests for asserting failures. Unit cloning fails when the destination is a stand alone unit and has reference guides to be cloned May 17, 2024
@vijayamanohararaj vijayamanohararaj marked this pull request as ready for review May 17, 2024 20:59
@vijayamanohararaj vijayamanohararaj requested review from a team and etaderhold and removed request for a team May 17, 2024 20:59
@vijayamanohararaj vijayamanohararaj merged commit 77c1e5e into staging May 21, 2024
2 checks passed
@vijayamanohararaj vijayamanohararaj deleted the vijaya/standalone_ref_clone branch May 21, 2024 15:29
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.

None yet

2 participants