1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed renaming artist to existing artist

This commit is contained in:
krateng 2022-04-21 16:00:29 +02:00
parent 181406d339
commit 713dbc34bb
2 changed files with 9 additions and 0 deletions

View File

@ -363,8 +363,16 @@ def get_artist_id(artistname,create_new=True,dbconn=None):
@connection_provider
def edit_artist(id,artistupdatedict,dbconn=None):
artist = get_artist(id)
changedartist = artistupdatedict # well
dbentry = artist_dict_to_db(artistupdatedict)
existing_artist = get_artist_id(changedartist,create_new=False,dbconn=dbconn)
if existing_artist:
raise exc.ArtistExists(changedartist)
op = DB['artists'].update().where(
DB['artists'].c.id==id
).values(

View File

@ -92,6 +92,7 @@ function doneEditing() {
}
else {
notifyCallback(req);
namefield.textContent = entity_name;
}
};