feat: add a new command - group unset channel-losses/channel-gains
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
26fc3ea71d
commit
3bfb3a40f7
|
@ -90,11 +90,19 @@ type updateGroupsParamsApplier struct {
|
|||
|
||||
func (u updateGroupsParamsApplier) apply(q *bun.UpdateQuery) *bun.UpdateQuery {
|
||||
if u.params.ChannelGains.Valid {
|
||||
q = q.Set("channel_gains = ?", u.params.ChannelGains.String)
|
||||
if u.params.ChannelGains.String != "" {
|
||||
q = q.Set("channel_gains = ?", u.params.ChannelGains.String)
|
||||
} else {
|
||||
q = q.Set("channel_gains = NULL")
|
||||
}
|
||||
}
|
||||
|
||||
if u.params.ChannelLosses.Valid {
|
||||
q = q.Set("channel_losses = ?", u.params.ChannelLosses.String)
|
||||
if u.params.ChannelLosses.String != "" {
|
||||
q = q.Set("channel_losses = ?", u.params.ChannelLosses.String)
|
||||
} else {
|
||||
q = q.Set("channel_losses = NULL")
|
||||
}
|
||||
}
|
||||
|
||||
if u.params.ServerKey.Valid {
|
||||
|
|
Loading…
Reference in New Issue
Block a user