mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2025-12-26 00:12:50 +00:00
fix(dashboard): cannot change storage policy for groups (#2577)
This commit is contained in:
parent
02abeaed2e
commit
d382bd8f8d
|
|
@ -100,8 +100,8 @@ func (c *groupClient) Upsert(ctx context.Context, group *ent.Group) (*ent.Group,
|
|||
SetSettings(group.Settings).
|
||||
ClearStoragePolicies()
|
||||
|
||||
if group.StoragePolicyID > 0 {
|
||||
stm.SetStoragePolicyID(group.StoragePolicyID)
|
||||
if group.Edges.StoragePolicies != nil && group.Edges.StoragePolicies.ID > 0 {
|
||||
stm.SetStoragePolicyID(group.Edges.StoragePolicies.ID)
|
||||
}
|
||||
|
||||
res, err := stm.Save(ctx)
|
||||
|
|
|
|||
Loading…
Reference in New Issue