Commit 47df0924 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1426-conflict-on-property-update' into 'devel_15.1.x'

update on sorting order preference is not important

See merge request !1265
parents e4b3358f bc739e45
Pipeline #36205 passed with stage
in 25 minutes and 3 seconds
......@@ -6,6 +6,8 @@ minerva (15.1.2) stable; urgency=medium
in error (#1440)
* Bug fix: colors for values in exported image were incorrect for
intermediate values, like 0.5 (#1442)
* Bug fix: when there is a problem with updating sorting preferences no error
is raised but silent warning is reported in the console (#1426)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 7 Jan 2021 15:00:00 +0200
......
......@@ -11,7 +11,9 @@ var GuiConnector = require('../../GuiConnector');
var logger = require('../../logger');
var Functions = require('../../Functions');
var NetworkError = require('../../NetworkError');
var Promise = require("bluebird");
var HttpStatus = require('http-status-codes');
/**
*
......@@ -67,7 +69,14 @@ AbstractAdminPanel.prototype.bindUserGuiPreference = function (params) {
var data = new UserPreferences();
data.setGuiPreference(params.preferenceName, newValue);
return self.getServerConnector().updateUserPreferences({user: user, preferences: data});
return self.getServerConnector().updateUserPreferences({user: user, preferences: data})
.catch(function (error) {
if (error instanceof NetworkError && error.statusCode === HttpStatus.CONFLICT) {
logger.warn("Problem with updating preference");
} else {
throw error;
}
});
}
}).catch(GuiConnector.alert);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment