mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-11 10:32:24 +01:00
importsongs: decode hash,old_id to ascii
This commit is contained in:
@ -42,9 +42,9 @@ class Command(BaseCommand):
|
|||||||
artist=import_song[1].decode('utf-8', errors='ignore').strip(),
|
artist=import_song[1].decode('utf-8', errors='ignore').strip(),
|
||||||
title=import_song[2].decode('utf-8', errors='ignore').strip(),
|
title=import_song[2].decode('utf-8', errors='ignore').strip(),
|
||||||
duration=float(import_song[4]),
|
duration=float(import_song[4]),
|
||||||
hash=import_song[5].strip(),
|
hash=import_song[5].decode('ascii').strip(),
|
||||||
deleted=bool(int(import_song[10])),
|
deleted=bool(int(import_song[10])),
|
||||||
old_id=import_song[0])
|
old_id=import_song[0].descode('ascii'))
|
||||||
try:
|
try:
|
||||||
song.save()
|
song.save()
|
||||||
except OperationalError as e:
|
except OperationalError as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user