summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest.c b/src/rest.c
index ddaa0dd..cf572bd 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -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);