Skip to content

Commit

Permalink
Merge pull request #176 from checkr/zz/fix-mysql-query
Browse files Browse the repository at this point in the history
Fix mysql query
  • Loading branch information
zhouzhuojie authored Oct 9, 2018
2 parents 1f7a0e1 + f20574f commit 93674ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/handler/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (c *crud) GetFlagSnapshots(params flag.GetFlagSnapshotsParams) middleware.R

func (c *crud) GetFlagEntityTypes(params flag.GetFlagEntityTypesParams) middleware.Responder {
entityTypes := []entity.FlagEntityType{}
if err := getDB().Order("key ASC").Find(&entityTypes).Error; err != nil {
if err := entity.NewFlagEntityTypeQuerySet(getDB()).All(&entityTypes); err != nil {
return flag.NewGetFlagEntityTypesDefault(500).WithPayload(
ErrorMessage("cannot find flag entity types. err:%s", err))

Expand Down

0 comments on commit 93674ef

Please sign in to comment.