From 00d92f67ae49a2698b2b4cd55007301313dde82e Mon Sep 17 00:00:00 2001 From: dlpzx Date: Fri, 27 Sep 2024 12:31:01 +0200 Subject: [PATCH] Wrong environment to check the redshift role --- .../services/redshift_table_share_validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/dataall/modules/redshift_datasets_shares/services/redshift_table_share_validator.py b/backend/dataall/modules/redshift_datasets_shares/services/redshift_table_share_validator.py index f46a919ae..a0f87a439 100644 --- a/backend/dataall/modules/redshift_datasets_shares/services/redshift_table_share_validator.py +++ b/backend/dataall/modules/redshift_datasets_shares/services/redshift_table_share_validator.py @@ -48,7 +48,7 @@ def validate_share_object_create( @staticmethod def validate_share_object_submit(session, dataset, share) -> bool: - environment = EnvironmentService.get_environment_by_uri(session, dataset.environmentUri) + environment = EnvironmentService.get_environment_by_uri(session, share.environmentUri) RedshiftTableValidator._validate_redshift_role( session=session, environment=environment, @@ -60,7 +60,7 @@ def validate_share_object_submit(session, dataset, share) -> bool: @staticmethod def validate_share_object_approve(session, dataset, share) -> bool: - environment = EnvironmentService.get_environment_by_uri(session, dataset.environmentUri) + environment = EnvironmentService.get_environment_by_uri(session, share.environmentUri) RedshiftTableValidator._validate_redshift_role( session=session, environment=environment,