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

Better handling of languages during exercise sync #1667

Open
rolandgeider opened this issue May 20, 2024 · 1 comment
Open

Better handling of languages during exercise sync #1667

rolandgeider opened this issue May 20, 2024 · 1 comment

Comments

@rolandgeider
Copy link
Member

rolandgeider commented May 20, 2024

At the moment, when performing an exercise sync, we also sync the available languages (wger.exercises.sync.sync_languages). This is fine and works as long as there aren't any new languages in the local instance because then the IDs won't match.

The solution for this would be to either

  • after synchronizing the languages, manually perform a map between the language ID that comes from the server and what we have locally or
  • add a UUID like we have for the exercises themselves or the ingredients so that we can lookup that instead since we know this value can't change

The second option is cleaner, but needs some DB migrations, slight changes to the API, etc.

See wger-project/docker#78

@rolandgeider
Copy link
Member Author

Mhhh, this also applies to the categories, muscles, equipment and licenses as well... 😭

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

No branches or pull requests

1 participant