Skip to content

Conversation

marcoacierno
Copy link
Member

Convert Conference.name from I18nCharField to models.CharField

Changes

  • Convert Conference.name from I18nCharField to models.CharField
  • Remove unused I18nCharField import from conference model
  • Create migration 0055 to handle database schema change
  • Update GraphQL Conference type to use regular field instead of localized resolver

Closes #4066

Generated with Claude Code

- Convert Conference.name from I18nCharField to models.CharField
- Remove unused I18nCharField import from conference model
- Create migration 0055 to handle database schema change
- Update GraphQL Conference type to use regular field instead of localized resolver

Fixes #4066

Co-authored-by: Marco Acierno <[email protected]>
Copy link

vercel bot commented Aug 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
pycon ✅ Ready (Inspect) Visit Preview Aug 4, 2025 3:01pm

@marcoacierno
Copy link
Member Author

@claude there are a few places where we do conference.name.localize(language_code). We don't ned the localize anymore, we can use name directly

Copy link
Contributor

claude bot commented Aug 4, 2025

Claude finished @marcoacierno's task —— View job


Finding and fixing conference.name.localize() calls ✅

  • Read repository setup instructions (CLAUDE.md)
  • Search for all instances of conference.name.localize
  • Update each instance to use direct name access
  • Run linting/testing if available
  • Commit and push changes

Completed! Found and updated 25 instances across 11 files:

  • backend/sponsors/tests/test_tasks.py
  • backend/sponsors/tasks.py
  • backend/submissions/tests/test_admin.py
  • backend/submissions/admin.py
  • backend/submissions/tasks.py
  • backend/schedule/views.py
  • backend/grants/tests/test_tasks.py
  • backend/grants/tasks.py
  • backend/schedule/tests/test_views.py
  • backend/schedule/tests/test_tasks.py
  • backend/schedule/video_upload.py
  • backend/schedule/tasks.py

All instances of conference.name.localize(language_code) have been replaced with direct conference.name usage to match the CharField conversion. Changes committed and pushed to the PR branch.

- Replace conference.name.localize(language_code) with direct conference.name usage
- Updated 25 instances across 11 files in backend codebase
- Conference name is now a regular CharField, no longer needs localization

Co-authored-by: Marco Acierno <[email protected]>
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@f8a87d3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4462   +/-   ##
=======================================
  Coverage        ?   94.53%           
=======================================
  Files           ?      352           
  Lines           ?    10131           
  Branches        ?      733           
=======================================
  Hits            ?     9577           
  Misses          ?      461           
  Partials        ?       93           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marcoacierno
Copy link
Member Author

@claude We likely need to update the ConferenceFactory as well to not set name as a multi-lingual field anymore

Copy link
Contributor

claude bot commented Aug 4, 2025

Claude encountered an error —— View job


Updating ConferenceFactory to use CharField

  • Read repository setup instructions (CLAUDE.md)
  • Search for ConferenceFactory in the codebase
  • Analyze current multi-lingual implementation
  • Update factory to use simple CharField
  • Run linting/testing if available
  • Commit and push changes

Updated ConferenceFactory and test:

  • Changed name = LanguageFactory("name") to name = factory.Faker("word") in backend/conferences/tests/factories.py:27
  • Updated test in backend/conferences/tests/test_models.py to use simple string instead of LazyI18nString
  • Removed unused LazyI18nString import

Committing changes...

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.

Change conference name from a multi-lingual field to a CharField
1 participant