Skip to content

Commit

Permalink
fix list users for cmsi
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-smile committed Apr 11, 2022
1 parent cd3662a commit 2c41074
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
specific language governing permissions and limitations under the License.
"""

from django.conf import settings

from common.constants import API_TYPE_Q
from components.component import ConfComponent
from .toolkit import configs
Expand All @@ -27,7 +29,9 @@ def handle(self):
extra_params["username"] = username

request_info = self.get_request_info(extra_params=extra_params)
# request_info = self.get_request_info()

if not self.request.app_code:
self.request.app_code = getattr(settings, "BK_APP_CODE", "")

response = self.outgoing.http_client.request(
self.dest_http_method,
Expand Down
1 change: 1 addition & 0 deletions paas2/esb/components/generic/templates/cmsi/send_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def handle(self):
}
self.response.payload = tools.inject_invalid_usernames(result, err.invalid_usernames)
return

data.update(user_data)

if not data["sender"]:
Expand Down
1 change: 1 addition & 0 deletions paas2/esb/components/generic/templates/cmsi/send_sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def handle(self):
"message": force_text(err),
}
self.response.payload = tools.inject_invalid_usernames(result, err.invalid_usernames)
return

data.update(user_data)

Expand Down
3 changes: 2 additions & 1 deletion paas2/esb/conf/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

BK_APP_CODE = "bk_apigateway"

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
Expand Down Expand Up @@ -277,4 +278,4 @@ def get_loggings(log_level):
ESB_ALL_BUFFET_COMPONENTS_CACHE_MAXSIZE = 10
ESB_ALL_BUFFET_COMPONENTS_CACHE_TTL_SECONDS = 300
ESB_BUFFET_COMPONENT_CACHE_MAXSIZE = 1000
ESB_BUFFET_COMPONENT_CACHE_TTL_SECONDS = 300
ESB_BUFFET_COMPONENT_CACHE_TTL_SECONDS = 300

0 comments on commit 2c41074

Please sign in to comment.