Skip to content

Commit

Permalink
Merge pull request #99 from openimis/hotfix/24.10
Browse files Browse the repository at this point in the history
Hotfix/24.10: admin migration add rights for persons covered search tab
  • Loading branch information
delcroip authored Oct 7, 2024
2 parents 8a8a023 + bf937f8 commit 181ffe6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions contract/migrations/0022_add_admin_rights.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.16 on 2024-10-07 12:10
import logging

from django.db import migrations

from core.utils import insert_role_right_for_system, remove_role_right_for_system

logger = logging.getLogger(__name__)

def add_rights(apps, schema_editor):
insert_role_right_for_system(64, 101500, apps)
insert_role_right_for_system(64, 154901, apps)

def remove_rights(apps, schema_editor):
remove_role_right_for_system(64, 101500, apps)
remove_role_right_for_system(64, 154901, apps)

class Migration(migrations.Migration):

dependencies = [
('contract', '0021_alter_contract_date_created_and_more'),
]

operations = [
migrations.RunPython(add_rights, reverse_code=remove_rights),
]
4 changes: 2 additions & 2 deletions contract/tests/services/services_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUpClass(cls):
super(ServiceTestContract, cls).setUpClass()
cls.user = User.objects.filter(username='admin').first()
if not cls.user:
cls.user = create_test_interactive_user(username='admin', password='S\/pe®Pąßw0rd™', super_user=True)
cls.user = create_test_interactive_user(username='admin', password='S\/pe®Pąßw0rd™')
cls.contract_service = ContractService(cls.user)
cls.contract_details_service = ContractDetailsService(cls.user)
cls.contract_contribution_plan_details_service = ContractContributionPlanDetailsService(cls.user)
Expand Down Expand Up @@ -304,7 +304,7 @@ def setUpClass(cls):
super(CalculationContractTest, cls).setUpClass()
cls.user = User.objects.filter(username='admin').first()
if not cls.user:
cls.user = create_test_interactive_user(username='admin', password='S\/pe®Pąßw0rd™', super_user=True)
cls.user = create_test_interactive_user(username='admin', password='S\/pe®Pąßw0rd™')
cls.contract_service = ContractService(cls.user)
cls.income = 500
cls.rate = 5
Expand Down

0 comments on commit 181ffe6

Please sign in to comment.