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

Move uuid helpers to out of the SiteUUID model #3

Closed
OmarIthawi opened this issue Jan 18, 2022 · 0 comments · Fixed by #8
Closed

Move uuid helpers to out of the SiteUUID model #3

OmarIthawi opened this issue Jan 18, 2022 · 0 comments · Fixed by #8

Comments

@OmarIthawi
Copy link
Contributor

OmarIthawi commented Jan 18, 2022

Move the organization mapping @classmethod helpers to be independent helpers, this way we can do the following:

def get_organization_by_uuid(organization_uuid):
    if should_site_use_org_models():
        return Organization.objects.get(edx_uuid=organization_uuid)
    else:
        TahoeSiteUUID.objects.get(site_uuid=organization_uuid).organization

Such helpers will enable abstracting the migration from LMS/CAG/Figures since they'll reference the same helper and their code will be unchanged.

Originally posted by @OmarIthawi in #2 (comment)

@OmarIthawi OmarIthawi changed the title **Suggested work for later PRs:** move uuid helpers to out of the SiteUUID model Suggested work for later PRs: move uuid helpers to out of the SiteUUID model Jan 18, 2022
@OmarIthawi OmarIthawi changed the title Suggested work for later PRs: move uuid helpers to out of the SiteUUID model Move uuid helpers to out of the SiteUUID model Jan 19, 2022
@OmarIthawi OmarIthawi mentioned this issue Feb 4, 2022
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 a pull request may close this issue.

1 participant