X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/0678dd50bd89ef1ad0f0d95c1e7907e31187a0d3..2d950c51810e29fd54bf706fa01a74be065f881c:/src/archive/migrations/0010_populate_license.py?ds=sidebyside diff --git a/src/archive/migrations/0010_populate_license.py b/src/archive/migrations/0010_populate_license.py index dc59bdc..caec303 100644 --- a/src/archive/migrations/0010_populate_license.py +++ b/src/archive/migrations/0010_populate_license.py @@ -9,9 +9,9 @@ def populate_license(apps, schema_editor): Audiobook = apps.get_model('archive.Audiobook') licenses = {} for a in Audiobook.objects.all(): - if a.mp3_tags: - tags = json.loads(a.mp3_tags) - uri = tags.get('license') + if a.mp3_published_tags: + tags = json.loads(a.mp3_published_tags) + uri = tags.get('tags', {}).get('license') if not uri: continue if uri not in licenses: