-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Fixes #11703] Documents can now be uploaded without specifying title via the REST API. #11872
[Fixes #11703] Documents can now be uploaded without specifying title via the REST API. #11872
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11872 +/- ##
==========================================
+ Coverage 64.26% 64.27% +0.01%
==========================================
Files 888 888
Lines 53610 53621 +11
Branches 6606 6606
==========================================
+ Hits 34451 34465 +14
- Misses 17650 17651 +1
+ Partials 1509 1505 -4 |
@ahmdthr please take a look at the failing tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently your test is failing
Sorry for the late response, but I was sick last week. I am going to fix the issues today. Thank you for waiting. |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
59204 | Triggered | Django Secret Key | 6847825 | .devcontainer/.env | View secret |
59204 | Triggered | Django Secret Key | 6847825 | .env_local | View secret |
59204 | Triggered | Django Secret Key | 6847825 | .env_dev | View secret |
9705160 | Triggered | Username Password | 6847825 | geonode/base/api/tests.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
test are failing again @ahmdthr |
@giohappy The tests are fine now. The tests were failing after the introduction of "Assets". It can also be back-ported to 4.3, if needed. |
@ahmdthr what do you think of setting the file name instead of None in case the title is missing? |
…tle is specified instead of 'None'. 2- Fixed test for uploading document without a title.
…mdthr/geonode into feature/document_upload_without_title
… via the REST API. (#11872) * Documents can now be uploaded without specifying title via the REST API. * Added test for document upload without title. * Fixed the document upload without title test. * Fixed linting issues. * Fixed tests for uploading document without a title. * Fixed Documents serializer. * Added file name as title when no title is provided. * Fixed tests for uploading document without a title. * 1- Using the name of the file as a title for document upload if no title is specified instead of 'None'. 2- Fixed test for uploading document without a title. * Fixed the test for document upload without a title. --------- Co-authored-by: Giovanni Allegri <[email protected]> (cherry picked from commit 852ce01)
… via the REST API. (#11872) (#12612) * Documents can now be uploaded without specifying title via the REST API. * Added test for document upload without title. * Fixed the document upload without title test. * Fixed linting issues. * Fixed tests for uploading document without a title. * Fixed Documents serializer. * Added file name as title when no title is provided. * Fixed tests for uploading document without a title. * 1- Using the name of the file as a title for document upload if no title is specified instead of 'None'. 2- Fixed test for uploading document without a title. * Fixed the test for document upload without a title. --------- Co-authored-by: Giovanni Allegri <[email protected]> (cherry picked from commit 852ce01) Co-authored-by: ahmdthr <[email protected]>
Fixes#11703 Upload document via REST API v2 does not work
The document upload does not work without specifying the title. With this PR the document will be uploaded while setting the title as the name of the uploaded file.
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.