Skip to content

Commit

Permalink
Ensure sessions get distinct files in config (#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Aug 20, 2021
1 parent 7d07a3b commit 039ad55
Showing 1 changed file with 3 additions and 4 deletions.
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

0 comments on commit 039ad55

Please sign in to comment.