Skip to content

Commit

Permalink
Merge pull request #465 - Gustav Westling's Workspace
Browse files Browse the repository at this point in the history
api/pkg/installation/statistics: remove validations for fields that default to 0
This fixes an issue where statistics with 0 codebases or users was considered invalid.

Merged via Sturdy
  • Loading branch information
zegl authored Feb 18, 2022
2 parents dde3f91 + 90ce48c commit c10abb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/pkg/installations/statistics/statistic.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Statistic struct {
IP *string `json:"-" db:"ip"`
RecordedAt time.Time `json:"recorded_at" db:"recorded_at"`
ReceivedAt time.Time `json:"-" db:"received_at"`
UsersCount uint64 `json:"users_count" db:"users_count" validate:"required"`
CodebasesCount uint64 `json:"codebases_count" db:"codebases_count" validate:"required"`
UsersCount uint64 `json:"users_count" db:"users_count"`
CodebasesCount uint64 `json:"codebases_count" db:"codebases_count"`
FirstUserEmail *string `json:"first_user_email" db:"first_user_email"`
}

0 comments on commit c10abb5

Please sign in to comment.