Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ckan check resource view list #2151

Merged
merged 7 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- [cygnus-common][CKANBackendImpl] allow empty result as resource_view_list (#2150)
- [cygnus-ngsi] Upgrade Dockerfile base image from centos8.4.2105 to Debian 11.2-slim
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,9 @@ private boolean existsView(String resId) throws CygnusRuntimeError, CygnusPersis

// check the status
if (res.getStatusCode() == 200) {
LOGGER.debug("Successful view listing (resourceId=" + resId + ")");
return (((JSONArray) res.getJsonObject().get("result")).size() > 0);
boolean isResultList = ((JSONArray) res.getJsonObject().get("result")).size() >= 0;
LOGGER.debug("View listing (resourceId=" + resId + "): checking if there is a result list is: " + isResultList + ")");
return isResultList;
} else {
throw new CygnusPersistenceError("Could not check if the view exists (resId=" + resId
+ ", statusCode=" + res.getStatusCode() + ")");
Expand Down