Skip to content

Commit

Permalink
upgrade requests CVE-2024-35195
Browse files Browse the repository at this point in the history
  • Loading branch information
open-risk committed Jun 20, 2024
1 parent fff4816 commit 32d8a2b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions equinox/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

from rest_framework import serializers

from equinox.settings import ROOT_VIEW
from risk.Scorecard import Scorecard


Expand All @@ -37,7 +36,7 @@ class Meta:
fields = ('id', 'scorecard_identifier', 'link')

def get_link(self, obj):
link = ROOT_VIEW + "/api/portfolio_data/scorecards/" + str(obj.pk)
link = "/api/portfolio_data/scorecards/" + str(obj.pk)
return link


Expand Down
2 changes: 0 additions & 2 deletions equinox/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@

ROOT_URLCONF = 'equinox.urls'

ROOT_VIEW = "http://localhost:8000"

SITE_ID = 1
# SITE_URL = "https://equinoxpoint.org"
SITE_URL = "http://127.0.0.1:8080/"
Expand Down
1 change: 0 additions & 1 deletion equinox/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from drf_yasg.views import get_schema_view
from rest_framework import permissions


from . import views, settings

schema_view = get_schema_view(
Expand Down
4 changes: 0 additions & 4 deletions policy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def get_context_data(self, **kwargs):
dimension['DimString'] = dimension['DimDescription'].replace(" ", "_").replace("/", "_")
context.update({'geoslices': json.dumps(dataset)})
context.update({'dimension_list': obj})
# context.update({'root_view': root_view})
return context


Expand All @@ -194,7 +193,6 @@ def get_context_data(self, **kwargs):

context.update({'dataseries': json.dumps(dataflow.dataset_id)})
context.update({'dimension_list': obj})
# context.update({'root_view': root_view})
return context


Expand Down Expand Up @@ -459,7 +457,6 @@ def get_context_data(self, **kwargs):
dataflow = DataFlow.objects.get(identifier=dataseries.df_name)
unit = dataseries.unit
context.update({'unit': json.dumps(unit)})
# context.update({'root_view': root_view})
context.update({'df_size': dataflow.dashboard_n})
return context

Expand Down Expand Up @@ -498,7 +495,6 @@ def get_context_data(self, **kwargs):

context.update({'content_data': json.dumps(content_data)})
context.update({'freshness': json.dumps(freshness)})
# context.update({'root_view': root_view})
return context


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ behave-django
pytest~=8.0.1
pytest-bdd
coverage
requests~=2.31.0
requests~=2.32.0
behave~=1.2.6
setuptools~=69.5.1
3 changes: 1 addition & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from django.test import TestCase

from equinox.serializers import ScorecardSerializer
from equinox.settings import ROOT_VIEW
from risk.Scorecard import Scorecard


Expand All @@ -38,5 +37,5 @@ def test_scorecard_api_endpoint(self):
scorecard = Scorecard.objects.get(scorecard_identifier='Test')
serializer = ScorecardSerializer(scorecard)
api_link = serializer.get_link(scorecard)
test_link = ROOT_VIEW + "/api/portfolio_data/scorecards/" + str(scorecard.pk)
test_link = "/api/portfolio_data/scorecards/" + str(scorecard.pk)
self.assertEquals(api_link, test_link)

0 comments on commit 32d8a2b

Please sign in to comment.