aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/db/models.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/db/models.go b/internal/db/models.go
index 3c2b6280..6e4fd2a7 100644
--- a/internal/db/models.go
+++ b/internal/db/models.go
@@ -231,6 +231,9 @@ func GetStatistic() (stats Statistic) {
}
func Ping() error {
+ if x == nil {
+ return errors.New("database not available")
+ }
return x.Ping()
}