Added indexed lists and link edition in tunes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import datetime
|
||||
import json
|
||||
|
||||
from folkugat_web.model import IndexedList
|
||||
from folkugat_web.model import temes as model
|
||||
|
||||
|
||||
@@ -27,9 +28,9 @@ def row_to_tema(row: tuple) -> model.Tema:
|
||||
return model.Tema(
|
||||
id=row[0],
|
||||
title=row[1],
|
||||
properties=list(map(model.Property.from_dict, json.loads(row[2]))),
|
||||
links=list(map(model.Link.from_dict, json.loads(row[3]))),
|
||||
lyrics=list(map(model.Lyrics.from_dict, json.loads(row[4]))),
|
||||
properties=IndexedList(map(model.Property.from_dict, json.loads(row[2]))),
|
||||
links=IndexedList(map(model.Link.from_dict, json.loads(row[3]))),
|
||||
lyrics=IndexedList(map(model.Lyrics.from_dict, json.loads(row[4]))),
|
||||
alternatives=json.loads(row[5]),
|
||||
ngrams=cell_to_ngrams(row[6]),
|
||||
modification_date=datetime.datetime.fromisoformat(row[7]),
|
||||
|
||||
Reference in New Issue
Block a user