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

Fix findID method for entity #18073

Closed

Conversation

Lainow
Copy link
Contributor

@Lainow Lainow commented Oct 16, 2024

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes !34752 and linked with datainjection/433
  • Here is a brief description of what this PR does

The findId method added a new condition in the WHERE, for example glpi_entities.id = 0. However, even when the method searches for an entity in the glpi_entities table, it continues to add this condition, which prevents the entity being found, as the condition becomes incorrect.

Screenshots (if appropriate):

@Lainow Lainow self-assigned this Oct 16, 2024
@Lainow Lainow closed this Oct 17, 2024
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.

1 participant