Skip to content

Commit

Permalink
FIX cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Dec 13, 2023
1 parent b4baaac commit 5ff4b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- Fix: improve error traces (#4387)
- Fix: on delete attributes operation, the lack of attribute in entity doesn't preclude the deletion of attributes which do exist (this way behaving same way as update attributes operation)
- Fix: POST /v2/entities/E/attrs?options=append was wrongly creating entities
- Fix: provide more inforamtive error description in some error responses in update/delete operations
- Fix: proper use of "PartialUpdate" (instead of "Unprocessed") in responses in the case of partial updates/deletions (#3499)
- Fix: response 404 Not Found "NotFound" errors instead of 422 Unprocessable Content "Unprocessed" in the case of missing attribute in existing entity in attribute update operations
- Add: CLI parameter -dbUri / env var ORION_MONGO_URI (#3794)
- Fix: improve logs in MongoDB query logic
- Upgrade Debian version from 11.6 to 12.1 in Dockerfile
Expand Down
4 changes: 0 additions & 4 deletions src/lib/mongoBackend/MongoCommonUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,6 @@ static bool updateContextAttributeItem
" - offending attribute: " + targetAttr->getName();

cerP->statusCode.fill(SccInvalidParameter, details);
//oe->fill(SccContextElementNotFound, ERROR_DESC_NOT_FOUND_ATTRIBUTE, ERROR_NOT_FOUND);

/* Although 'ca' has been already pushed into cerP, the pointer is still valid, of course */
ca->found = false;
Expand Down Expand Up @@ -2613,12 +2612,9 @@ static bool deleteContextAttributeItem
" - attribute not found";

cerP->statusCode.fill(SccInvalidParameter, details);
//oe->fill(SccContextElementNotFound, ERROR_DESC_NOT_FOUND_ATTRIBUTE, ERROR_NOT_FOUND);

alarmMgr.badInput(clientIp, "attribute to be deleted is not found", targetAttr->getName());
ca->found = false;

//return false;
}

return true;
Expand Down

0 comments on commit 5ff4b26

Please sign in to comment.