Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure sessions get distinct files in config #2646

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions panel/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
components.
"""
import ast
import copy
import inspect
import os
import sys
Expand Down Expand Up @@ -235,10 +236,8 @@ def __getattribute__(self, attr):
session_config[state.curdoc] = {}
if (attr in ('raw_css', 'css_files', 'js_files', 'js_modules') and
state.curdoc and attr not in session_config[state.curdoc]):
if 'css' in attr:
setattr(self, attr, super().__getattribute__(attr))
else:
setattr(self, attr, super().__getattribute__(attr))
new_obj = copy.copy(super().__getattribute__(attr))
setattr(self, attr, new_obj)
if state.curdoc and state.curdoc in session_config and attr in session_config[state.curdoc]:
return session_config[state.curdoc][attr]
elif f'_{attr}' in params and getattr(self, f'_{attr}_') is not None:
Expand Down