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

Allows metadata upload to dataset having different UUID #1

Merged
merged 5 commits into from
Dec 18, 2023

Conversation

ridoo
Copy link

@ridoo ridoo commented Oct 26, 2023

@dorohahn create a PR against our main development line (thuenen_4.x in case of the GeoNode fork) as I do here:

image

Please also link to the actual issue:

Resolves: https://github.com/Thuenen-GeoNode-Development/Sprints/issues/7

@ridoo
Copy link
Author

ridoo commented Oct 26, 2023

@dorohahn please do NOT branch from the main development line, but from a common ancestor of our main development line and the upstream. This should be 4.1.3.

Also, make sure to clean up your code (remove duplicates, unnecessary imports, etc.) -- you should take care your code aligns with PEP-8. Also to make sure response codes do match. Changing reponse semantics should be made consistently. In this case I mean especially the lines here:

if dataset_uuid and layer.uuid != dataset_uuid:
status_code = 404
out["success"] = True
out["errors"] = "WARNING: UUID of dataset and metadata are different. Metadata XML was still uploaded"
return HttpResponse(json.dumps(out), content_type="application/json", status=status_code)

@ahmdthr ahmdthr force-pushed the feature/import_metadata_different_uuid branch from aced1fa to ad097ca Compare November 3, 2023 12:25
@@ -568,6 +576,7 @@ define(function (require, exports) {
callback(array);
} else if (resp.success === true) {
self.polling = false;
console.log(resp)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed for the feature branch

@ridoo ridoo changed the title Added changes for Sprint#7 for uploading metadata having different uu… Allows metadata upload to dataset having different UUID Nov 20, 2023
@ridoo
Copy link
Author

ridoo commented Nov 23, 2023

Update needed: API endpoint

…tionality of the UI forms to the REST API endpoint i.e., the metadata still gets uploaded when the UUID is different. Adjusted the unit tests for both UI and REST API.
@ahmdthr ahmdthr marked this pull request as ready for review November 30, 2023 05:02
@ridoo
Copy link
Author

ridoo commented Nov 30, 2023

@ahmdthr could you please resolve the issues?

@ridoo ridoo merged commit 785fbf8 into thuenen_4.x Dec 18, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants