Restyle New album page design (#76)

This commit is contained in:
restyled-io[bot]
2022-07-02 09:06:14 +03:00
committed by Mungai Geoffrey
parent 7d59993203
commit 714775a67e
11 changed files with 67 additions and 54 deletions
+11 -3
View File
@@ -3,6 +3,7 @@ This file contains the Album class for interacting with
album documents in MongoDB.
"""
from typing import List
from app.db.mongodb import convert_many
from app.db.mongodb import convert_one
from app.db.mongodb import MongoAlbums
@@ -21,8 +22,13 @@ class Albums(MongoAlbums):
"""
album = album.__dict__
return self.collection.update_one(
{"album": album["title"], "artist": album["artist"]},
{"$set": album},
{
"album": album["title"],
"artist": album["artist"]
},
{
"$set": album
},
upsert=True,
).upserted_id
@@ -67,5 +73,7 @@ class Albums(MongoAlbums):
"""
self.collection.update_one(
{"hash": hash},
{"$set": {"colors": colors}},
{"$set": {
"colors": colors
}},
)