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

创建或修改addresslist时,当设置的address_id中包含有重复的address时,会导致系统中存在重复的address #81

Open
liuyp2018 opened this issue Aug 2, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@liuyp2018
Copy link

liuyp2018 commented Aug 2, 2019

调用PUT /v1/addresslists/{addresslist}修改addresslist时,当address_id中包含有重复的address时:
{
"addresslist": "11",
"address_id": [
"addr-zV2QNkjkYqMP","addr-zV2QNkjkYqMP"
]
}

可以成功操作,但查询此address,此address会存在两条相同的记录:
{
"total_count": 2,
"address_set": [
{
"address_id": "addr-zV2QNkjkYqMP",
"address_list_id": "adl-57ZORpm996Yv",
"address": "[email protected]",
"remarks": "",
"verification_code": "",
"status": "active",
"create_time": "2019-08-02T01:48:16Z",
"verify_time": "2019-08-02T01:48:16Z",
"status_time": "2019-08-02T01:48:16Z",
"notify_type": "email"
},
{
"address_id": "addr-zV2QNkjkYqMP",
"address_list_id": "adl-57ZORpm996Yv",
"address": "[email protected]",
"remarks": "",
"verification_code": "",
"status": "active",
"create_time": "2019-08-02T01:48:16Z",
"verify_time": "2019-08-02T01:48:16Z",
"status_time": "2019-08-02T01:48:16Z",
"notify_type": "email"
}
]
}

当创建addressslist时,也存在该问题。

@liuyp2018 liuyp2018 added the bug Something isn't working label Aug 2, 2019
@liuyp2018 liuyp2018 changed the title 修改addresslist时,当设置的address_id中包含有重复的address时,会引起系统中存在重复的address 创建或修改addresslist时,当设置的address_id中包含有重复的address时,会导致系统中存在重复的address Aug 5, 2019
@huojiao2006
Copy link
Contributor

fix

huojiao2006 added a commit to huojiao2006/notification that referenced this issue Aug 8, 2019
@liuyp2018
Copy link
Author

经验证,该问题依然存在。

@l1ch40
Copy link
Contributor

l1ch40 commented Mar 9, 2020

The main reason is that addrIds doesn't do deduplication.

I commit a PR #108 just now

@l1ch40 l1ch40 mentioned this issue Mar 12, 2020
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

3 participants