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

文本模式注释掉一些变量之后,不进行发布,重新点击文本模式进行修改,会重复出现注释掉的数据 #4276

Closed
3 tasks done
dragontree101 opened this issue Mar 22, 2022 · 2 comments · Fixed by #4279
Labels
bug Categorizes issue or PR as related to a bug. help wanted

Comments

@dragontree101
Copy link

dragontree101 commented Mar 22, 2022

描述bug

当一个参数对象里面是list的时候,在"文本"模式把其中一个list的值注释掉之后,这个时候不发布,但是重新点击"文本"模式,就会多出一行之前已经注释掉的那一行,并且多了一行注释的行

复现

通过如下步骤可以复现:

  1. 删除list的一个配置

image

  1. 点击提交修改

  2. 切回"文本"模式之后,除开被注释的那一行以外,有多了一行没有注释的在最后面

image

  1. 如果没有注意(因为默认在最后一行又进行了放开),想把之前的要注释掉的数据放开,就会出现错误。

期望

期望如果不进行发布,重新点击文本,之前注释掉的那个配置还是继续注释,不会又自动添加一行一摸一样的在最后面

截图

如果可以,附上截图来描述你的问题

额外的细节和日志

  • 版本:apollo的 2.0.0-SNAPSHOT
  • 错误日志 无
  • 配置: 无
  • 平台和操作系统
@nobodyiam nobodyiam added bug Categorizes issue or PR as related to a bug. help wanted labels Mar 23, 2022
@nobodyiam nobodyiam added this to the 2.0.0 milestone Mar 23, 2022
@dragontree101
Copy link
Author

我稍微看了下源码, 好像逻辑是从release数据库和item数据库都把数据取出来了,然后进行了合并
但是因为这次修改并没有进行发布, 所以release里面拿到的还是 全部的内容
然后item数据库里面又有这次修改保存的注释掉的内容了
所以把两部分数据进行了合并, 造成了既有之前已经发布的内容和之后注释掉的内容

不知道我这么理解对不对

@nobodyiam
Copy link
Member

There is an isDeleted property of the item, it seems the table view display takes this property into consideration while the text view doesn't.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug. help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants