Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Conversation

@axelfahy
Copy link
Contributor

@axelfahy axelfahy commented Jan 17, 2025

Currently, when listing entities with the getAll parameter, the first value is overwritten. This PR removes the overwrite of the first value when using getAll in list methods, for all entities.

Proposed changes

  • Remove the hardcoding of the first value when using getAll in list methods for all entities.

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

PR #796 did not fix this related issue.

FYI, the following entities did not use getAll and the variable has been removed:

  • pycti/entities/opencti_kill_chain_phase.py
  • pycti/entities/opencti_location.py
  • pycti/entities/opencti_marking_definition.py
  • pycti/entities/opencti_observed_data.py
  • pycti/entities/opencti_stix_nested_ref_relationship.py
  • pycti/entities/opencti_threat_actor.py
  • pycti/entities/opencti_threat_actor_group.py
  • pycti/entities/opencti_threat_actor_individual.py

@axelfahy axelfahy force-pushed the fix/first-value-in-list branch from 5ba6321 to ed069d7 Compare January 17, 2025 09:45
@marieflorescontact marieflorescontact added the community use to identify PR from community label Feb 13, 2025
@marieflorescontact marieflorescontact self-assigned this Feb 17, 2025
Copy link
Member

@marieflorescontact marieflorescontact left a comment

Choose a reason for hiding this comment

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

reviewed and tested ok 👌
thank you for your contribution 🙂

@marieflorescontact marieflorescontact merged commit b22c3bc into OpenCTI-Platform:master Feb 18, 2025
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community use to identify PR from community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants