summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-19 13:33:50 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-19 13:34:32 +0100
commitcdff83d0918aaeb3a7c930f59f4a9c5b99ba374e (patch)
tree266cd0f613f342c1bcadf329d2baa7f6f30df541
parentf64b1c2767640a5010cf16f37b36e62152691954 (diff)
rest: cannot fail with image/create if it existsv1.2.5-8
legacy web console uses this REST API to refresh an existing image. Relax check not to break things.
-rw-r--r--src/rest.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/rest.c b/src/rest.c
index 02fbf8a..d3239a3 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -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;