mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-25 17:42:25 +01:00
refactor: Update models to use DatabaseV2 instead of DataSourceV2
This commit is contained in:
@@ -28,7 +28,7 @@ func getPostgresqlSession(ctx context.Context, ds *models.DataSource) (s db.Sess
|
||||
if ds.Host == "" {
|
||||
host = constants.DefaultHost
|
||||
}
|
||||
if ds.Port == "" {
|
||||
if ds.Port == 0 {
|
||||
port = constants.DefaultPostgresqlPort
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ func getPostgresqlSessionV2(ctx context.Context, ds *models2.DatabaseV2) (s db.S
|
||||
if ds.Host == "" {
|
||||
host = constants.DefaultHost
|
||||
}
|
||||
if ds.Port == "" {
|
||||
if ds.Port == 0 {
|
||||
port = constants.DefaultPostgresqlPort
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user