Compare commits

..

No commits in common. "60b69684368b5336db096bc7a11acde8a2be5b9c" and "d361767471b20369e8f8ac9cf7121bd761da8a2b" have entirely different histories.

3 changed files with 4 additions and 364 deletions

View File

@ -6,7 +6,6 @@ Created on: 19.08.22
"""
import json
from json import JSONDecodeError
import requests
from django.contrib.auth.decorators import login_required
@ -14,8 +13,6 @@ from django.http import JsonResponse, HttpRequest
from django.utils.decorators import method_decorator
from django.utils.http import urlencode
from django.views import View
from django.utils.translation import gettext_lazy as _
from requests.auth import HTTPDigestAuth
from konova.sub_settings.proxy_settings import PROXIES, CLIENT_PROXY_AUTH_USER, CLIENT_PROXY_AUTH_PASSWORD
@ -60,18 +57,7 @@ class ClientProxyParcelSearch(BaseClientProxyView):
def get(self, request: HttpRequest):
url = request.META.get("QUERY_STRING")
content, response_code = self.perform_url_call(url)
try:
body = json.loads(content)
except JSONDecodeError as e:
body = {
"totalResultsCount": -1,
"geonames": [
{
"title": _("The external service is currently unavailable.<br>Please try again in a few moments...")
}
]
}
body = json.loads(content)
if response_code != 200:
return JsonResponse({
"status_code": response_code,

Binary file not shown.

File diff suppressed because it is too large Load Diff