diff options
| author | Romain Derie <rde@odoo.com> | 2019-04-25 08:46:21 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2019-04-25 08:53:00 +0000 |
| commit | f0bc5e0b52710784e0aa49de15ced5e91a4a7145 (patch) | |
| tree | 578c56667f4bb06801fd983758517c1c50725c54 /addons/web_unsplash/static/src/js/unsplash_image_widget.js | |
| parent | b11930047f6652ccf03963c3f18a2a38c502b652 (diff) | |
[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>
Diffstat (limited to 'addons/web_unsplash/static/src/js/unsplash_image_widget.js')
| -rw-r--r-- | addons/web_unsplash/static/src/js/unsplash_image_widget.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_unsplash/static/src/js/unsplash_image_widget.js b/addons/web_unsplash/static/src/js/unsplash_image_widget.js index 4338b7d6dd0..a0ccd00d667 100644 --- a/addons/web_unsplash/static/src/js/unsplash_image_widget.js +++ b/addons/web_unsplash/static/src/js/unsplash_image_widget.js @@ -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); }); } } |
