1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-30 22:34:53 +00:00

fix select bug when admin share repo to group (#5931)

This commit is contained in:
lian 2024-01-31 13:30:27 +08:00 committed by GitHub
parent f5fdebe5bb
commit 690d4a6a8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,10 +172,8 @@ class SysAdminShareToGroup extends React.Component {
shareToGroup = () => {
let groups = [];
let repoID = this.props.repoID;
if (this.state.selectedOption && this.state.selectedOption.length > 0 ) {
for (let i = 0; i < this.state.selectedOption.length; i ++) {
groups[i] = this.state.selectedOption[i].id;
}
if (this.state.selectedOption) {
groups[0] = this.state.selectedOption.id;
}
seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => {
let errorMsg = [];