X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/23994f414001d00c7e1dcad37a33cd7379d510e1..ad43f8a3a57a3bb73edefe7e815328676cabcdb1:/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 9533003..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: + if a.mp3_published_tags: tags = json.loads(a.mp3_published_tags) - uri = tags.get('license') + uri = tags.get('tags', {}).get('license') if not uri: continue if uri not in licenses: