From 5c2c514825e8a7ef161629d3a74ca668ac47abcd Mon Sep 17 00:00:00 2001 From: Kobe Date: Thu, 12 Jun 2025 14:55:55 +0200 Subject: [PATCH] fixed settings not loading --- routes/__pycache__/main.cpython-313.pyc | Bin 88744 -> 88691 bytes routes/main.py | 20 ++++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/routes/__pycache__/main.cpython-313.pyc b/routes/__pycache__/main.cpython-313.pyc index d1a308d73261b6cb23e4df821b4cc648f682994d..b18bbe38245ba0f3bff03639de5ac7597b10fd9c 100644 GIT binary patch delta 712 zcmZ|MO-K}B7zglqcD|h1+4W;vr_p9}6S=ZPE+e<+~mj#PXM(>b^EIpAD?K&+QZ?-{$@hS=z@bl@rcrX5fuK2~m0(zMj_n<$CGiEzSt1^olk*>Ct`oQ~D-s zzyp~n@Z-o#H~7sfGd@@k>~sRfWQ9&8eI%z6zntCvpB&GelXGV-1G0Hy{-leojZ*qX zoPDo^6y)kX`*-ZW_JLl7C}K5o5zBD7-Jn$>AK7n0B2h(dVgO0R&8UJ{gJ@z2Vu%7_ zi6Y{NZp0IV_@Z40b@-k=X&%Y;({KjATe>#zgQEiByxOv;w%Dy*IW=LIRIMmm^Ga+{ ziP_EVIi+L7yCR43a?_&R^f;W8<0I1gqgYmr7>AVgn+FkK))E951F($=5njN8HRy)jEKFMC zWpLiZtvO-)jhRsSLYqn&*)*8=5F3d5U|Sdjg5gIA z)>CmGriXgYUaXj6q96jnbyv;VkJ=T)2Opx6(6EReg6?ilK6T;zxaWU3|Nn)%|AL)= z$=dgAHUZHy)7BG0<l3_+5{Tp>e{}xm_98f}DEj=oeP?)8~(c)z!nNMCsC^(A{ znU2(vsfdTXj|jlg4uh4fN7@;iWG8vcvNJC%Ncmw)0}5N|UO{%R3xdN4DcAu%XQ7lo zAjv5k&WCgP2XF}_7oA)?Am$o6am$FZTsBY^kl*Wd z?GCw!-bGoUtdK2~m9mwxN-m_tGDB&Sjg*4SQd(q=(kk53?%%|>5?s2HXqnlhAr#NTNINWpAjHTp(n6!8|@$ocnP2g6&?OYP~>(+`*u|6#} zCB!DZxjQNL%$?nI*QMQ!33ubOaMB%^>;1tY&xtf{isPm<_Q$b*`IL_RI_^*7fjAyW z;z8=Nm4`FFK-$+A_x0T~+EV!q>cbCH3>y<17ur<3fm!}DgV6P3Kz6si>ea1rBe3e1 zZN&s$b$aKk5eC)KJ5?ZqbI$3zD zjpxG+n*mtuy9kHOd^bxoDh)KFM)TLgWuBYKDj{Vd0A6kVD0G=&UUM|V5tiS{P8N~! zGyp!O(+@W7ZaYjcypf~&$A7v;^^g%NwI=~kc<^ifK5&^FL10_<8N?N5QMG5x_Isxp SZA^w=Mq$_qXJD+I{`+54W$c&$ diff --git a/routes/main.py b/routes/main.py index e99f63a..f237b08 100644 --- a/routes/main.py +++ b/routes/main.py @@ -917,19 +917,15 @@ def init_routes(main_bp): if active_tab == 'smtp': smtp_settings = KeyValueSettings.get_value('smtp_settings') - # Get connection settings for the connections tab - portainer_settings = None - nginx_settings = None - git_settings = None - if active_tab == 'connections': - portainer_settings = KeyValueSettings.get_value('portainer_settings') - nginx_settings = KeyValueSettings.get_value('nginx_settings') - git_settings = KeyValueSettings.get_value('git_settings') + # Get connection settings + portainer_settings = KeyValueSettings.get_value('portainer_settings') + nginx_settings = KeyValueSettings.get_value('nginx_settings') + git_settings = KeyValueSettings.get_value('git_settings') - # Get management API key for the connections tab - management_api_key = ManagementAPIKey.query.filter_by(is_active=True).first() - if management_api_key: - site_settings.management_api_key = management_api_key.api_key + # Get management API key for the connections tab + management_api_key = ManagementAPIKey.query.filter_by(is_active=True).first() + if management_api_key: + site_settings.management_api_key = management_api_key.api_key # Get events for the events tab events = None