diff --git a/g2p_registry_membership/models/group.py b/g2p_registry_membership/models/group.py index b4088ba5..10ceec08 100644 --- a/g2p_registry_membership/models/group.py +++ b/g2p_registry_membership/models/group.py @@ -93,7 +93,7 @@ def recompute_indicators_for_batch(self, offset, limit, recomputed_fields=None): def recompute_indicators(self, recomputed_fields=None): if recomputed_fields is not None and len(recomputed_fields) > 0: - if type(recomputed_fields[0]) is str: + if isinstance(recomputed_fields[0], str): recomputed_fields = self._get_calculated_group_fields(recomputed_fields) else: recomputed_fields = self._get_calculated_group_fields() diff --git a/g2p_registry_membership/models/group_membership.py b/g2p_registry_membership/models/group_membership.py index b5a22b2c..f85fc611 100644 --- a/g2p_registry_membership/models/group_membership.py +++ b/g2p_registry_membership/models/group_membership.py @@ -76,7 +76,8 @@ def _kind_onchange(self): for m in kind_id: if m.isdigit(): # Only get the digit part of the string kind id - # Newly added kinds has Neworigin prefix so this is used to remove that + # Newly added kinds has Neworigin prefix so this + # is used to remove that kind_str = kind_str + m # If the rec_line which is the kind id is the same with the unique kind diff --git a/g2p_registry_membership/tests/test_membership.py b/g2p_registry_membership/tests/test_membership.py index d90a56c8..86755e8c 100644 --- a/g2p_registry_membership/tests/test_membership.py +++ b/g2p_registry_membership/tests/test_membership.py @@ -132,7 +132,8 @@ def test_03_disabled_individual(self): self.assertEqual(self.registrant_3.disabled, curr_date, "Error disabling an individual!") _logger.info( - f"Test 3: Modify disabled individual: {self.registrant_3.name} information. {self.registrant_3.disabled}" + f"Test 3: Modify disabled individual: {self.registrant_3.name} information. " + f"{self.registrant_3.disabled}" ) self.registrant_3.update( { @@ -161,14 +162,16 @@ def test_04_individual_with_ended_membership(self): grp_rec = self.group_1.group_membership_ids[0] _logger.info( - f"Test 4: End membership of individual: {grp_rec.individual.name} membership with group: {grp_rec.group.name}." + f"Test 4: End membership of individual: {grp_rec.individual.name} membership with " + f"group: {grp_rec.group.name}." ) curr_date = fields.Datetime.now() grp_rec.update({"ended_date": curr_date}) self.assertEqual(grp_rec.is_ended, True, "Error ending the individual's membership to group!") _logger.info( - f"Test 4: Modify individual with ended membership: {grp_rec.individual.name} information. {grp_rec.is_ended}" + f"Test 4: Modify individual with ended membership: {grp_rec.individual.name} information. " + f"{grp_rec.is_ended}" ) grp_rec.individual.update( { diff --git a/g2p_registry_rest_api/__manifest__.py b/g2p_registry_rest_api/__manifest__.py index 489e811a..c54b5218 100644 --- a/g2p_registry_rest_api/__manifest__.py +++ b/g2p_registry_rest_api/__manifest__.py @@ -9,19 +9,13 @@ "license": "Other OSI approved licence", "development_status": "Alpha", "depends": [ - "base", - "mail", - "contacts", - "component", - "base_rest", - "pydantic", - "base_rest_pydantic", - "extendable", + "g2p_registry_base", "g2p_registry_group", "g2p_registry_individual", - "base_rest_auth_user_service", + "fastapi", + "extendable_fastapi", ], - "external_dependencies": {"python": ["extendable-pydantic"]}, + "external_dependencies": {"python": ["extendable-pydantic", "pydantic"]}, "data": [ "security/g2p_security.xml", "security/ir.model.access.csv", diff --git a/g2p_registry_rest_api_extension_demo/__manifest__.py b/g2p_registry_rest_api_extension_demo/__manifest__.py index c45e5007..2f5cc067 100644 --- a/g2p_registry_rest_api_extension_demo/__manifest__.py +++ b/g2p_registry_rest_api_extension_demo/__manifest__.py @@ -9,10 +9,9 @@ "license": "Other OSI approved licence", "development_status": "Alpha", "depends": [ - "base", "g2p_registry_rest_api", ], - "external_dependencies": {"python": ["extendable-pydantic", "pydantic==1.10.10"]}, + "external_dependencies": {"python": ["extendable-pydantic", "pydantic"]}, "data": [], "assets": {}, "demo": [], diff --git a/requirements.txt b/requirements.txt index 6db6ab15..493cd5d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ # generated from manifests external_dependencies extendable-pydantic -pydantic==1.10.10 +pydantic schwifty