From 255cf33d85342d81ccb2ff52adf04eee8cbbd6c4 Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Mon, 5 Feb 2018 20:04:35 +0100 Subject: [PATCH] importsongs: decode hash,old_id to ascii --- marietje/marietje/management/commands/importsongs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marietje/marietje/management/commands/importsongs.py b/marietje/marietje/management/commands/importsongs.py index 143f098..b8a2ca1 100644 --- a/marietje/marietje/management/commands/importsongs.py +++ b/marietje/marietje/management/commands/importsongs.py @@ -42,9 +42,9 @@ class Command(BaseCommand): artist=import_song[1].decode('utf-8', errors='ignore').strip(), title=import_song[2].decode('utf-8', errors='ignore').strip(), duration=float(import_song[4]), - hash=import_song[5].strip(), + hash=import_song[5].decode('ascii').strip(), deleted=bool(int(import_song[10])), - old_id=import_song[0]) + old_id=import_song[0].descode('ascii')) try: song.save() except OperationalError as e: