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

post_entity will not completely override the existing entity #232

Closed
djs0109 opened this issue Jan 10, 2024 · 1 comment · Fixed by #233
Closed

post_entity will not completely override the existing entity #232

djs0109 opened this issue Jan 10, 2024 · 1 comment · Fixed by #233
Assignees
Labels
bug Something isn't working

Comments

@djs0109
Copy link
Contributor

djs0109 commented Jan 10, 2024

Describe the bug
post_entity will not completely override the existing entity

To Reproduce

  1. create entity
entity = {
    "id": "Test:001",
    "type": "Test",
    "humidity": {
        "type": "Number",
        "value": 1,
        "metadata": {}
    },
    "temperature": {
        "type": "Number",
        "value": 1,
        "metadata": {}
    }
}
cb_client.post_entity(ContextEntity(**entity))
  1. delete an attribute and update entity with post_entity
entity_delete_attr = {
    "id": "Test:001",
    "type": "Test",
    "temperature": {
        "type": "Number",
        "value": 1,
        "metadata": {}
    }
}
cb_client.post_entity(ContextEntity(**entity_delete_attr ), update=True)

Expected behavior

The attribute humidity is deleted, which is currently not.

Environment

  • Orion 3.7.0
@djs0109 djs0109 added the bug Something isn't working label Jan 10, 2024
@djs0109 djs0109 self-assigned this Jan 17, 2024
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant