Skip to content

Commit

Permalink
fix: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aht007 committed Dec 13, 2024
1 parent df9f9cc commit 6f5fc2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion commerce_coordinator/apps/commercetools/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def __getitem__(self, item):
def rebuild(self, results: List[T]):
return PaginatedResult(results, total=self.total, offset=self.offset)


class Refund(TypedDict):
"""
Refund object definition
Expand All @@ -116,6 +117,7 @@ class Refund(TypedDict):
created: Union[str, int]
status: str


class CommercetoolsAPIClient:
"""Commercetools API Client"""

Expand Down Expand Up @@ -578,7 +580,7 @@ def update_return_payment_state_after_successful_refund(
)
raise OpenEdxFilterException(str(err)) from err

def _preprocess_refund_object(self, refund: Refund, psp:str) -> Refund:
def _preprocess_refund_object(self, refund: Refund, psp: str) -> Refund:
"""
Pre process refund object based on PSP
"""
Expand Down
3 changes: 1 addition & 2 deletions commerce_coordinator/apps/paypal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from .models import KeyValueCache



logger = logging.getLogger(__name__)


Expand All @@ -47,7 +46,7 @@ def _get_certificate(self, url):
cache = KeyValueCache.objects.get(cache_key=url)
return cache.value
except KeyValueCache.DoesNotExist:
r = requests.get(url) # pylint: disable=missing-timeout
r = requests.get(url) # pylint: disable=missing-timeout

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical

The full URL of this request depends on a
user-provided value
.
KeyValueCache.objects.create(cache_key=url, cache_value=r.text)
return r.text

Expand Down

0 comments on commit 6f5fc2a

Please sign in to comment.