python3: convert .values to list before accessing (#40830)

This commit is contained in:
Nicolas Roche 2020-03-19 12:03:37 +01:00
parent 5e731e5b59
commit 6ee1285701
2 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ class ContactAdd(FormView):
msg['password'] = str(random.SystemRandom().random())
msg['send_registration_email'] = getattr(settings, 'CONTACT_SEND_REGISTRATION_EMAIL', True)
authentic_site = settings.KNOWN_SERVICES.get('authentic').values()[0]
authentic_site = list(settings.KNOWN_SERVICES.get('authentic').values())[0]
authentic_url = authentic_site.get('url')
authentic_orig = authentic_site.get('orig')
authentic_secret = authentic_site.get('secret')

View File

@ -148,7 +148,7 @@ def push_wcs_formdata(request, formdef_reference, context=None):
def get_wcs_data(endpoint, params=None):
wcs_site = get_wcs_services().values()[0]
wcs_site = list(get_wcs_services().values())[0]
wcs_site_url = wcs_site['url']
if not wcs_site_url.endswith('/'):
wcs_site_url += '/'