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

OP-2163: added possibility to configure check for delete operation #138

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

sniedzielski
Copy link
Contributor

@sniedzielski sniedzielski commented Nov 21, 2024

TICKET: https://openimis.atlassian.net/browse/OP-2163

  • add missing maker-checker logic for deleting group
  • make possibility to enable/disable by config - by default maker checker is enabled for Group Deletion

@sniedzielski sniedzielski marked this pull request as ready for review November 21, 2024 13:33
individual/tests/group_service_test.py Outdated Show resolved Hide resolved
individual/gql_mutations.py Show resolved Hide resolved
@sniedzielski
Copy link
Contributor Author

@weilu Could you re-check PR? I added tests as you proposed in your comments.

@sniedzielski sniedzielski requested a review from weilu November 25, 2024 15:41
weilu
weilu previously approved these changes Nov 25, 2024
@weilu
Copy link
Contributor

weilu commented Nov 25, 2024

@sniedzielski Thanks! I simplified the test to be just sufficient to cover the conditional maker-checker logic. I don't think we need to repeat the coverage on Group delete permission.

Copy link

@lruzicki lruzicki left a comment

Choose a reason for hiding this comment

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

LGTM

@sniedzielski
Copy link
Contributor Author

Module tests are green, but there is one fail in 'all modules tests':

ERROR: test_other_optionset_sync (dhis2_etl.tests.daily_sync_tests.DailySyncTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/core/validation/base.py", line 62, in validator
    instance.full_clean(validate_unique=False)
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/django/db/models/base.py", line 1502, in full_clean
    raise ValidationError(errors)
django.core.exceptions.ValidationError: {'code': ['Ensure this value has at most 6 characters (it has 55).']}

During handling of the above exception, another exception occurred:

@delcroip What should we do with that test? Should we try to fix it before merging this and other PRs?

@sniedzielski sniedzielski merged commit ed9de8c into develop Dec 4, 2024
10 of 14 checks passed
@sniedzielski sniedzielski deleted the feature/OP-2163 branch December 4, 2024 16:42
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.

3 participants