Updated publish_urls condition
@@ -562,11 +562,13 @@ def update_web_services(services_url, api_token, timeout, publish_urls, res_id):
try:
response = session.post(rest_url, timeout=timeout)
+
+ if publish_urls == True and response.status_code == 201:
+ try:
+
resource = utils.get_resource_by_shortkey(res_id)
response_content = json.loads(response.content)
- if publish_urls:
- try:
for key, value in response_content["resource"].iteritems():
resource.extra_metadata[key] = value
resource.save()
