mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
Restyle New album page design (#76)
This commit is contained in:
committed by
Mungai Geoffrey
parent
7d59993203
commit
714775a67e
@@ -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
|
||||
}},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user