fix: session error fixed related to thumbnails. (#12760)

* fix: session error fixed related to thumbnails.

* compute_and_cache moved to session scope

* lint fix done
This commit is contained in:
İbrahim Ercan
2021-01-27 14:04:14 +03:00
committed by Ville Brofeldt
parent 99534f2cfd
commit 3a962f81f6

View File

@@ -49,13 +49,13 @@ def cache_chart_thumbnail(
user = security_manager.get_user_by_username(
current_app.config["THUMBNAIL_SELENIUM_USER"], session=session
)
screenshot.compute_and_cache(
user=user,
cache=thumbnail_cache,
force=force,
window_size=window_size,
thumb_size=thumb_size,
)
screenshot.compute_and_cache(
user=user,
cache=thumbnail_cache,
force=force,
window_size=window_size,
thumb_size=thumb_size,
)
return None
@@ -73,6 +73,6 @@ def cache_dashboard_thumbnail(
user = security_manager.get_user_by_username(
current_app.config["THUMBNAIL_SELENIUM_USER"], session=session
)
screenshot.compute_and_cache(
user=user, cache=thumbnail_cache, force=force, thumb_size=thumb_size,
)
screenshot.compute_and_cache(
user=user, cache=thumbnail_cache, force=force, thumb_size=thumb_size,
)