diff --git a/apimanager/apicollections/views.py b/apimanager/apicollections/views.py index 42ce06c..4bf588f 100644 --- a/apimanager/apicollections/views.py +++ b/apimanager/apicollections/views.py @@ -155,7 +155,7 @@ def apicollections_update(request): 'is_sharable': True if request.POST.get('api_collection_is_sharable').strip().lower() == "true" else False, 'description': request.POST.get('api_collection_description').strip() } - result = api.put(urlpath, payload=payload) + result = api.put(urlpath, payload=payload, version=settings.API_ROOT['v510']) return result diff --git a/apimanager/apimanager/settings.py b/apimanager/apimanager/settings.py index 4b38fd2..321670a 100644 --- a/apimanager/apimanager/settings.py +++ b/apimanager/apimanager/settings.py @@ -324,7 +324,7 @@ API_ROOT = { "v510": OBPv510 } # For some reason, swagger is not available at the latest API version -API_URL_SWAGGER = API_HOST + '/obp/v1.4.0/resource-docs/v' + OBPv500 + '/swagger' # noqa +#API_URL_SWAGGER = API_HOST + '/obp/v1.4.0/resource-docs/v' + OBPv500 + '/swagger' # noqa if not OAUTH_CONSUMER_KEY: raise ImproperlyConfigured('Missing settings for OAUTH_CONSUMER_KEY') diff --git a/apimanager/branches/views.py b/apimanager/branches/views.py index dc42752..d4bc2e6 100644 --- a/apimanager/branches/views.py +++ b/apimanager/branches/views.py @@ -168,7 +168,7 @@ class IndexBranchesView(LoginRequiredMixin, FormView): error_once_only(self.request, err) return super(IndexBranchesView, self).form_invalid(form) if 'code' in result and result['code']>=400: - error_once_only(self.request, result['message']) + messages.error(self.request, result['message']) return super(IndexBranchesView, self).form_valid(form) msg = 'Branch {} for Bank {} has been created successfully!'.format(result['id'], result['bank_id']) messages.success(self.request, msg) diff --git a/apimanager/connectormethod/templates/connectormethod/index.html b/apimanager/connectormethod/templates/connectormethod/index.html index 8569591..5650955 100644 --- a/apimanager/connectormethod/templates/connectormethod/index.html +++ b/apimanager/connectormethod/templates/connectormethod/index.html @@ -77,7 +77,7 @@ {% if forloop.counter0 > 0 %}
- +
{% endif %} diff --git a/apimanager/obp/api.py b/apimanager/obp/api.py index 4f5f75e..b77d006 100644 --- a/apimanager/obp/api.py +++ b/apimanager/obp/api.py @@ -142,8 +142,8 @@ class API(object): else: return None - def get_swagger(self): - """Gets the swagger definition from the API""" + """ def get_swagger(self): + """"""Gets the swagger definition from the API """""" # Poor man's caching ... if not self.session_data.get('swagger'): # API throws 500 if authenticated via GatewayLogin ... @@ -151,7 +151,7 @@ class API(object): response = requests.get(settings.API_URL_SWAGGER) swagger = self.handle_response(response) self.session_data['swagger'] = swagger - return self.session_data.get('swagger') + return self.session_data.get('swagger') """ def get_bank_id_choices(self): """Gets a list of bank ids and bank ids as used by form choices"""