super_user and services updated

This commit is contained in:
2024-12-05 18:59:46 +03:00
parent 88f94c37c2
commit 88309eb49d
20 changed files with 317 additions and 116 deletions

View File

@@ -18,7 +18,6 @@ from databases.sql_models.company.company import Companies
from databases.sql_models.identity.identity import People
class InsertBudgetRecord(BaseModel):
iban: str
bank_date: str = datetime.now().__str__()
@@ -272,6 +271,7 @@ def parse_comment_for_build_parts(
comment: str, max_build_part: int = 200, parse: str = "DAIRE"
):
from regex_func import category_finder
results, results_list = category_finder(comment), []
print("results[parse]", results[parse])
for result in results[parse] or []:

View File

@@ -10,7 +10,10 @@ def parse_token_object_to_dict(request): # from requests import Request
if valid_token := get_object_via_access_key(request=request):
endpoint_name = str(request.url).replace(str(request.base_url), "/")
if str(endpoint_name) in Config.INSECURE_PATHS or str(endpoint_name) in Config.NOT_SECURE_PATHS:
if (
str(endpoint_name) in Config.INSECURE_PATHS
or str(endpoint_name) in Config.NOT_SECURE_PATHS
):
return valid_token
endpoint_active = EndpointRestriction.filter_one(
EndpointRestriction.endpoint_name.ilike(f"%{endpoint_name}%"),