|
@@ -62,7 +62,7 @@ func (r *globalLimitRepository) UpdateGlobalLimitByHostId(ctx context.Context, r
|
|
|
|
|
|
func (r *globalLimitRepository) IsGlobalLimitExistByHostId(ctx context.Context, hostId int64) (bool, error) {
|
|
|
var count int64
|
|
|
- err := r.DB(ctx).Model(&model.GlobalLimit{}).Where("host_id = ? AND state = 0", hostId).Count(&count).Error
|
|
|
+ err := r.DB(ctx).Model(&model.GlobalLimit{}).Where("host_id = ? AND state = false", hostId).Count(&count).Error
|
|
|
|
|
|
if err != nil {
|
|
|
return false, err
|