File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- from typing import List , Dict
2
1
from fastapi import FastAPI , responses , status
3
2
from fastapi .encoders import jsonable_encoder
4
3
from pydantic import BaseModel
@@ -102,4 +101,5 @@ def update_versions_to_newest() -> responses.PlainTextResponse:
102
101
general .remove_and_refresh_session (session_token )
103
102
return responses .PlainTextResponse (status_code = status .HTTP_200_OK )
104
103
105
- session .start_session_cleanup_thread ()
104
+
105
+ session .start_session_cleanup_thread ()
Original file line number Diff line number Diff line change 3
3
from typing import Any , List , Dict , Union
4
4
5
5
from submodules .model .business_objects import app_version , general
6
+ from submodules .model .enums import try_parse_enum_value
6
7
from service_overview import Service , check_db_uptodate , get_services_info
7
8
import git
8
9
from upgrade_logic import base_logic
@@ -91,7 +92,7 @@ def check_has_newer_version() -> bool:
91
92
lookup_dict = get_services_info (True )
92
93
diff_version = False
93
94
for db_entry in current_version :
94
- x = Service [ db_entry .service ]
95
+ x = try_parse_enum_value ( db_entry .service , Service , False )
95
96
if x in lookup_dict :
96
97
link = lookup_dict [x ]["link" ]
97
98
remote_version = __last_tag (link )
@@ -123,7 +124,7 @@ def __last_tag(repo_link: str) -> Any:
123
124
if tag [0 ] == "v" :
124
125
return tag [1 :]
125
126
return tag
126
- except Exception as e :
127
+ except Exception :
127
128
return "0.0.0"
128
129
129
130
You can’t perform that action at this time.
0 commit comments