Skip to content

Commit

Permalink
Fix isort problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Yrob committed Jun 7, 2024
1 parent 3e84b24 commit cba7358
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dso_api/dbroles.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from __future__ import annotations

import logging
import re
from typing import Optional
from urllib.parse import urlparse
import re

from asgiref.local import Local
from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion src/dso_api/dynamic_api/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
from more_itertools import first
from rest_framework.exceptions import ValidationError
from rest_framework.request import Request
from schematools.naming import to_snake_case
from schematools.permissions import UserScopes
from schematools.types import DatasetTableSchema, TemporalDimensionFields
from schematools.naming import to_snake_case

from dso_api.dynamic_api.permissions import check_filter_field_access

Expand Down
3 changes: 2 additions & 1 deletion src/dso_api/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Route all write requests to the default database

import random

import environ
from django.conf import settings

Expand All @@ -27,7 +28,7 @@ def db_for_read(self, model, **hints):
When multple replica databases are available, choose one at random
"""
if len(replicas) > 1:
return random.choice(replicas)
return random.choice(replicas) # nosec: B311
return "replica_1"

def db_for_write(self, model, **hints):
Expand Down

0 comments on commit cba7358

Please sign in to comment.