Restyle Integrate topbar and refactor playlists page (#31)

This commit is contained in:
restyled-io[bot]
2022-04-14 11:39:26 +03:00
committed by GitHub
parent 85c59b4cba
commit a6e46dcde2
8 changed files with 66 additions and 35 deletions
+8 -4
View File
@@ -1,8 +1,7 @@
"""
This file contains the Album class for interacting with
This file contains the Album class for interacting with
album documents in MongoDB.
"""
from app import db
from bson import ObjectId
@@ -24,8 +23,13 @@ class Albums(db.Mongo):
Inserts a new album object into the database.
"""
return self.collection.update_one(
{"album": album["album"], "artist": album["artist"]},
{"$set": album},
{
"album": album["album"],
"artist": album["artist"]
},
{
"$set": album
},
upsert=True,
).upserted_id