[FIX] web_unsplash: correctly load images after credentials
Since media dialog and unsplash refactoring (1f847a1e2e,78a30d44c) there was a bug after adding credentials. Indeed, when doing a search for the first time and no credentials are set, it shows a form to add the missing credentials. When saving those, it should automatically perform the initial search now that the credentials are set. But it was not the case anymore, it would keep reloading the credential form. User would have to close and reopen media dialog. closes odoo/odoo#32943 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -227,7 +227,8 @@ weWidgets.ImageWidget.include({
|
||||
params: params,
|
||||
}).then(function () {
|
||||
self.unsplashAPI.clientId = key;
|
||||
self._renderImages();
|
||||
self._unsplash.error = false;
|
||||
self.search(self._unsplash.query);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user