mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Fix issue where current theme cannot be found in list of themes (#2079)
* Fix issue where current theme cannot be found in list of themes
This commit is contained in:
@@ -174,7 +174,12 @@ def config():
|
|||||||
configs = {c.key: get_config(c.key) for c in configs}
|
configs = {c.key: get_config(c.key) for c in configs}
|
||||||
|
|
||||||
themes = ctf_config.get_themes()
|
themes = ctf_config.get_themes()
|
||||||
themes.remove(get_config("ctf_theme"))
|
|
||||||
|
# Remove current theme but ignore failure
|
||||||
|
try:
|
||||||
|
themes.remove(get_config("ctf_theme"))
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
return render_template("admin/config.html", themes=themes, **configs)
|
return render_template("admin/config.html", themes=themes, **configs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user