diff --git a/superset/row_level_security/api.py b/superset/row_level_security/api.py index 24e9dd49359..6d9c2e1d05e 100644 --- a/superset/row_level_security/api.py +++ b/superset/row_level_security/api.py @@ -285,7 +285,7 @@ class RLSRestApi(BaseSupersetModelRestApi): try: new_model = UpdateRLSRuleCommand(pk, item).run() - return self.response(201, id=new_model.id, result=item) + return self.response(200, id=new_model.id, result=item) except RolesNotFoundValidationError as ex: logger.error( "Role not found while updating RLS rule %s: %s", diff --git a/tests/integration_tests/security/row_level_security_tests.py b/tests/integration_tests/security/row_level_security_tests.py index 98c8f169fdb..2d5dd28c17f 100644 --- a/tests/integration_tests/security/row_level_security_tests.py +++ b/tests/integration_tests/security/row_level_security_tests.py @@ -471,7 +471,7 @@ class TestRowLevelSecurityUpdateAPI(SupersetTestCase): rv = self.client.put(f"/api/v1/rowlevelsecurity/{rls.id}", json=payload) status_code, _data = rv.status_code, json.loads(rv.data.decode("utf-8")) # noqa: F841 - assert status_code == 201 + assert status_code == 200 rls = ( db.session.query(RowLevelSecurityFilter)