Skip to content

Commit

Permalink
Clean dojo.settings imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Nov 20, 2023
1 parent 41b6516 commit 5424d69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions dojo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from django.db.models import JSONField
import hyperlink
from cvss import CVSS3
from dojo.settings.settings import SLA_BUSINESS_DAYS


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -2762,7 +2761,7 @@ def status(self):

def _age(self, start_date):
from dojo.utils import get_work_days
if SLA_BUSINESS_DAYS:
if settings.SLA_BUSINESS_DAYS:
if self.mitigated:
days = get_work_days(self.date, self.mitigated.date())
else:
Expand Down
2 changes: 1 addition & 1 deletion dojo/remote_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from drf_spectacular.extensions import OpenApiAuthenticationExtension
from rest_framework.authentication import RemoteUserAuthentication as OriginalRemoteUserAuthentication
from netaddr import IPAddress
from dojo.settings import settings
from django.conf import settings
from dojo.pipeline import assign_user_to_groups, cleanup_old_groups_for_user

logger = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions dojo/tools/qualys_webapp/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
from dojo.models import Endpoint, Finding

try:
from dojo.settings.settings import QUALYS_WAS_WEAKNESS_IS_VULN
from django.conf.settings import QUALYS_WAS_WEAKNESS_IS_VULN
except ImportError:
# Avoid breaking change
QUALYS_WAS_WEAKNESS_IS_VULN = False

try:
from dojo.settings.settings import QUALYS_WAS_UNIQUE_ID
from django.conf.settings import QUALYS_WAS_UNIQUE_ID
except ImportError:
# Avoid breaking change
QUALYS_WAS_UNIQUE_ID = False
Expand Down

0 comments on commit 5424d69

Please sign in to comment.