mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
process albums seperate from tracks
- break populate function into 2
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
This file contains the Album class for interacting with
|
||||
album documents in MongoDB.
|
||||
"""
|
||||
from app import db
|
||||
from app.db.mongodb import convert_many
|
||||
from app.db.mongodb import convert_one
|
||||
from app.db.mongodb import MongoAlbums
|
||||
@@ -26,7 +25,8 @@ class Albums(MongoAlbums):
|
||||
upsert=True,
|
||||
).upserted_id
|
||||
|
||||
def insert_many(self, albums: list):
|
||||
def insert_many(self, albums: Album):
|
||||
albums = [a.__dict__ for a in albums]
|
||||
"""
|
||||
Inserts multiple albums into the database.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user