Skip to content

Commit

Permalink
fix: add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
rettetdemdativ committed Jun 20, 2024
1 parent 11b0efa commit 969ecd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/cosmos/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func GetUsersMatchingWithListing(ctx context.Context, container *azcosmos.Contai
if !ok {
return nil, fmt.Errorf("value of %s has incorrect format", field)
}
if field == "hwgEnergyClass" || field == "fgeeEnergyClass" {
if field == "hwgEnergyClass" || field == "fgeeEnergyClass" && ecStr != nil {
ecClass := models.EnergyClass(*ecStr)
addQueryParam(&sb, &queryParams, "@"+field, mapping.condition, models.GetEnergyClasses()[ecClass.GetIndex():])
} else {
Expand Down

0 comments on commit 969ecd4

Please sign in to comment.