mirror of https://git.48k.eu/ogserver
rest: allow room update keeping the same name
Fix the code tha checked the existence of other rooms with the same name in the center but only check the rooms other than the one being updated.master
parent
e3a9814167
commit
892f049135
|
@ -6308,8 +6308,8 @@ static int og_cmd_post_room_update(json_t *element,
|
|||
|
||||
result = dbi_conn_queryf(dbi->conn,
|
||||
"SELECT nombreaula FROM aulas "
|
||||
"WHERE nombreaula='%s' AND idcentro=%d",
|
||||
room.name, room.center);
|
||||
"WHERE nombreaula='%s' AND idcentro=%d AND idaula<>'%u'",
|
||||
room.name, room.center, room.id);
|
||||
|
||||
if (!result) {
|
||||
dbi_conn_error(dbi->conn, &msglog);
|
||||
|
|
Loading…
Reference in New Issue