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:
parent
181406d339
commit
713dbc34bb
@ -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(
|
||||
|
@ -92,6 +92,7 @@ function doneEditing() {
|
||||
}
|
||||
else {
|
||||
notifyCallback(req);
|
||||
namefield.textContent = entity_name;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user