Skip to content

Commit

Permalink
Merge 07672dd into 011edfc
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonc86 committed May 21, 2019
2 parents 011edfc + 07672dd commit a12cf8a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ledger/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def in_dbca_domain(user):

def get_department_user_minimal(email):
try:
res = requests.get('{}/api/users/?minimal&email={}'.format(settings.CMS_URL,email), auth=(settings.LEDGER_USER,settings.LEDGER_PASS))
res = requests.get('{}/api/users/?minimal&email={}'.format(settings.CMS_URL,email), auth=(settings.LEDGER_USER,settings.LEDGER_PASS), verify=False)
res.raise_for_status()
data = json.loads(res.content).get('objects')
if len(data) > 0:
Expand All @@ -29,7 +29,7 @@ def get_department_user_minimal(email):

def get_department_user_compact(email):
try:
res = requests.get('{}/api/users/fast/?compact&email={}'.format(settings.CMS_URL,email), auth=(settings.LEDGER_USER,settings.LEDGER_PASS))
res = requests.get('{}/api/users/fast/?compact&email={}'.format(settings.CMS_URL,email), auth=(settings.LEDGER_USER,settings.LEDGER_PASS), verify=False)
res.raise_for_status()
data = json.loads(res.content).get('objects')
if len(data) > 0:
Expand Down
3 changes: 2 additions & 1 deletion ledger/checkout/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def handle_successful_order(self, order):
if return_preload_url:
try:
requests.get('{}?invoice={}'.format(return_preload_url, invoice.reference),
cookies=self.request.COOKIES)
cookies=self.request.COOKIES,
verify=False)
# bodge for race condition: if preload updates the session, we need to update it
self.request.session._session_cache = self.request.session.load()
except requests.exceptions.ConnectionError:
Expand Down
2 changes: 1 addition & 1 deletion ledger/checkout/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def doInvoice(self,order_number,total,**kwargs):

def handle_last_check(self,url):
try:
res = requests.get(url,cookies=self.request.COOKIES)
res = requests.get(url,cookies=self.request.COOKIES, verify=False)
res.raise_for_status()
response = json.loads(res.content.decode('utf-8')).get('status')
if response != 'approved':
Expand Down
2 changes: 1 addition & 1 deletion ledger/payments/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def isLedgerURL(url):

def checkURL(url):
try:
resp = requests.get(url)
resp = requests.get(url, verify=False)
resp.raise_for_status()
except:
raise
Expand Down
2 changes: 1 addition & 1 deletion ledger/taxonomy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get(self, request, *args, **kwargs):
add_filter('kingdom_id IN ({})'.format(fauna_kingdom), params)
elif kingdom == 'flora':
add_filter('kingdom_id NOT IN ({})'.format(fauna_kingdom), params)
r = requests.get(base_url, params=params)
r = requests.get(base_url, params=params, verify=False)
names = []
try:
features = r.json()['features']
Expand Down
2 changes: 1 addition & 1 deletion wildlifelicensing/apps/returns/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get(self, request, *args, **kwargs):
resource_obj = OrderedDict()
resource_obj['name'] = resource.get('name', '')
resource_obj['data'] = url
resource_obj['python'] = "requests.get('{0}', cookies={{'sessionid':'{1}'}}).content".format(
resource_obj['python'] = "requests.get('{0}', cookies={{'sessionid':'{1}'}}, verify=False).content".format(
url,
sessionid
)
Expand Down

0 comments on commit a12cf8a

Please sign in to comment.