Skip to content

Commit

Permalink
Fix table load
Browse files Browse the repository at this point in the history
  • Loading branch information
Laica-Lunasys committed Jul 13, 2024
1 parent bed4005 commit f966fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *Mysql) GetAllGroup() ([]Groups, error) {

// CreateGroup - Create New Group
func (s *Mysql) CreateGroup(group Groups) error {
r := s.client.First(&Groups{}, "name = ?", group.Name)
r := s.client.Preload("Permissions").First(&Groups{}, "name = ?", group.Name)

if r.RowsAffected != 0 {
return errors.New("group already exists")
Expand Down

0 comments on commit f966fb7

Please sign in to comment.