Skip to content

Comments

fix: Migrate LanguagesTaxnomy._taxonomy_class to reflect refactoring#489

Merged
kdmccormick merged 1 commit intomainfrom
kdmccormick/tagging-class-name
Feb 20, 2026
Merged

fix: Migrate LanguagesTaxnomy._taxonomy_class to reflect refactoring#489
kdmccormick merged 1 commit intomainfrom
kdmccormick/tagging-class-name

Conversation

@kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Feb 20, 2026

Fixes an error along the lines of:
Unable to import taxonomy_class for -1:
openedx_tagging.core.tagging.models.system_defined.LanguageTaxonomy

This was missed in: #470

We had updated migration 0012 to initialize LanguagesTaxonomy with the post-refactoring _taxonomy_class, but didn't add a new data migration to fix the classpath. Migration 0019 now fixes that.
This commit also reverts our change to 0012 for the sake of historical continuity (but it doesn't really matter either way since 0019 will overwrite the _taxonomy_class).

Bumps patch version.

openedx-platform companion PR:


Tested by looking at django admin before running the migration and confirming the class path is wrong, running the migration, and then checking to see that it's fixed.

Screenshot 2026-02-20 at 3 33 44 PM
Running migrations:
  Applying oel_tagging.0019_language_taxonomy_class... OK
Screenshot 2026-02-20 at 3 34 26 PM

Claude Code wrote the migration file. Only change I made was to remove id=-1 from Taxonomy.objects.filter(...), which Claude had originally included alongside the OLD_CLASS and NEW_CLASS filters. I'd like this migration to update any entry in the table whose _taxonomy_class points at the old LanguageTaxonomy class.

Fixes an error along the lines of:
    Unable to import taxonomy_class for -1:
    openedx_tagging.core.tagging.models.system_defined.LanguageTaxonomy

This was missed in: #470
We had updated migration 0012 to initialize LanguagesTaxonomy with the
post-refactoring _taxonomy_class, but didn't add a new data migration
to fix the classpath. Migration 0019 now fixes that.
This commit also reverts our change to 0012 for the sake of historical
continuity (but it doesn't really matter either way since 0019 will overwrite
the _taxonomy_class).

Co-Authored-By: Claude Code <noreply@anthropic.com>
@kdmccormick kdmccormick merged commit 6bdab16 into main Feb 20, 2026
9 checks passed
@kdmccormick kdmccormick deleted the kdmccormick/tagging-class-name branch February 20, 2026 22:20
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.

2 participants