Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 使用{% for value in list(variable) %} 循环中,多次提取变量后,同变量名的值无法被修改 #519

Open
4 tasks done
yangwudong opened this issue Apr 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yangwudong
Copy link

Verify steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Latest 我已经使用 最新源码 测试过,问题依旧存在
  • Core 这是 QD 框架存在的问题,并非我所使用的 QD 早期版本(如 20210628及之前版号 等)或模板的特定问题
  • Meaningful 我提交的不是无意义的 催促更新或修复 请求

QD Version

20240210

Bug on OS

Linux

Bug on Platform

Docker/Linux 64位

To Reproduce

  1. 创建新的模版
  2. 添加一个请求,并提取变量 - authorization_inf
  3. 然后添加for循环开始
  4. 配置循环使用 {% for value in list(variable) %}, 可以参考下面:
    {% for shop_id in list(org_codes) %}
  5. 在循环内,第一个请求后,在预览中提取变量,譬如变量名为:authorization_inf
image
  1. 在循环内,第二个请求中,使用该变量 - authorization_inf
image
  1. 结束循环

Describe the Bug

现在错误的结果:
变量在循环中,第一次请求后赋值可以覆盖掉变量 - authorization_inf里面的内容,但是循环到第二次或者大于1次的时候,提取变量赋值的时候,就再也无法对该变量 - authorization_inf 进行赋值替换内容,直到循环结束后,即for循环外。

QD config

No response

QD log

无报错

Expected behavior

期待结果:
变量在循环中,每次都可以在调用第一个请求后,覆盖变量名 - authorization_inf里面对应的值,以便于第二个请求的时候,传入正确的内容。

Screenshots

No response

@yangwudong yangwudong added the bug Something isn't working label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant