diff --git a/app/http/endpoints/api/panel/panelcreate.go b/app/http/endpoints/api/panel/panelcreate.go index e1be8fe..f349f50 100644 --- a/app/http/endpoints/api/panel/panelcreate.go +++ b/app/http/endpoints/api/panel/panelcreate.go @@ -406,6 +406,12 @@ func (p *panelBody) verifyFormId(guildId uint64) (bool, error) { } func (p *panelBody) verifyTeams(guildId uint64) (bool, error) { + // Query does not work nicely if there are no teams created in the guild, but if the user submits no teams, + // then the input is guaranteed to be valid. + if len(p.Teams) == 0 { + return true, nil + } + return dbclient.Client.SupportTeam.AllTeamsExistForGuild(guildId, p.Teams) }