wger icon indicating copy to clipboard operation
wger copied to clipboard

Better handling of languages during exercise sync

Open rolandgeider opened this issue 1 year ago • 1 comments

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 https://github.com/wger-project/docker/issues/78

rolandgeider avatar May 20 '24 15:05 rolandgeider

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

rolandgeider avatar May 20 '24 15:05 rolandgeider