This commit is contained in:
parent
cfdd2e8b9c
commit
25be449635
|
@ -419,7 +419,7 @@ class Version(models.Model):
|
|||
if service_objects[service['url']].secondary:
|
||||
continue
|
||||
url = urllib.parse.urljoin(service['url'], target_url)
|
||||
response = requests.put(url, data=bundle_content)
|
||||
response = requests.post(url, files=[('bundle', bundle_content)])
|
||||
if not response.ok:
|
||||
raise DeploymentError(exception_message % (service_id, response.status_code))
|
||||
if not job:
|
||||
|
@ -458,7 +458,7 @@ class Version(models.Model):
|
|||
if service_objects[service['url']].secondary:
|
||||
continue
|
||||
url = urllib.parse.urljoin(service['url'], target_url)
|
||||
response = requests.put(url, data=bundle_content)
|
||||
response = requests.post(url, files=[('bundle', bundle_content)])
|
||||
if not response.ok:
|
||||
raise DeploymentError(exception_message % (service_id, response.status_code))
|
||||
if not job:
|
||||
|
|
|
@ -218,7 +218,7 @@ def mocked_http(url, request):
|
|||
|
||||
if url.path == '/api/export-import/bundle-import/':
|
||||
# alter WCS_AVAILABLE_FORMS response with newly installed forms
|
||||
with tarfile.open(mode='r', fileobj=io.BytesIO(request.body)) as tar:
|
||||
with tarfile.open(mode='r', fileobj=io.BytesIO(request.original.files[0][1])) as tar:
|
||||
manifest_json = json.load(tar.extractfile('manifest.json'))
|
||||
for element in manifest_json.get('elements'):
|
||||
if element['type'] not in [x['id'] for x in WCS_AVAILABLE_OBJECTS['data']]:
|
||||
|
|
Loading…
Reference in New Issue