mirror of https://git.48k.eu/ogserver
rest: cannot fail with image/create if it exists
legacy web console uses this REST API to refresh an existing image. Relax check not to break things.master v1.2.5-8
parent
f64b1c2767
commit
cdff83d091
|
@ -2695,13 +2695,6 @@ static int og_cmd_add_image(json_t *element, struct og_msg_params *params,
|
|||
params->id = new_image_id;
|
||||
json_object_set_new(element, "id", json_string(params->id));
|
||||
} else {
|
||||
if (!update) {
|
||||
syslog(LOG_ERR, "cannot create image file `%s', it already exists\n",
|
||||
params->image.name);
|
||||
og_dbi_close(dbi);
|
||||
return -1;
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, "updating existing image `%s'\n", params->image.name);
|
||||
snprintf(new_image_id, sizeof(new_image_id), "%lu", params->image.id);
|
||||
params->id = new_image_id;
|
||||
|
|
Loading…
Reference in New Issue