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 gebruiksrecht delete logic #83

Merged
merged 11 commits into from
Sep 20, 2023

Conversation

bbrands02
Copy link
Contributor

No description provided.

@github-actions
Copy link

👋 @bbrands02
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible. In the meanwhile make sure your PR checks the following boxes

  • Is based on an issue
  • Has been locally tested
  • Has been tested with the admin UI
  • Has been discussed with the development team in an open channel

Copy link
Contributor

@rjzondervan rjzondervan left a comment

Choose a reason for hiding this comment

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

Looks okay, one tip for making the code more self-explanatory

$gebruiksrechtValues = $this->entityManager->getRepository('App:Value')->findBy(['stringValue' => $informatieObject->getUri(), 'attribute' => $gebruiksrechtInfoObjectProperty]);

// If we have less than 2 gebruiksrechten (1 is the gebruiksrecht we are deleting) for this enkelvoudiginformatieobject set enkelvoudiginformatieobject.indicatieGebruiksrecht to null.
if (count($gebruiksrechtValues) < 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fine in itself, but wouldn't =< 1 be more self explaining?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed

@bbrands02 bbrands02 merged commit 22773a4 into main Sep 20, 2023
4 of 12 checks passed
@bbrands02 bbrands02 deleted the feature/XZ-119/delete-gebruiksrecht-logic branch September 20, 2023 11:08
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.

2 participants