Set contexts/subsystems to *any if empty + tests

This commit is contained in:
ionutboangiu
2022-11-15 17:55:41 +02:00
committed by Dan Christian Bogos
parent 04f45b15f2
commit 4305c505a8
3 changed files with 342 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ type DispatcherWithAPIOpts struct {
// SetDispatcherProfile add/update a new Dispatcher Profile
func (apierSv1 *APIerSv1) SetDispatcherProfile(args *DispatcherWithAPIOpts, reply *string) error {
if missing := utils.MissingStructFields(args.DispatcherProfile, []string{utils.ID, utils.Subsystems}); len(missing) != 0 {
if missing := utils.MissingStructFields(args.DispatcherProfile, []string{utils.ID}); len(missing) != 0 {
return utils.NewErrMandatoryIeMissing(missing...)
}
if args.Tenant == utils.EmptyString {