Überflüssige WHERE Statements entfernt
This commit is contained in:
parent
07da723899
commit
4f6c3da687
1 changed files with 1 additions and 3 deletions
4
main.go
4
main.go
|
@ -226,10 +226,8 @@ func savePosition(db *sql.DB, dep Departure, apiBaseURL string) {
|
|||
return
|
||||
}
|
||||
|
||||
today := whenTime.Format("2006-01-02")
|
||||
|
||||
var existingID string
|
||||
err = db.QueryRow("SELECT id FROM trips WHERE fahrt_nr = ?", dep.Line.FahrtNr, today).Scan(&existingID)
|
||||
err = db.QueryRow("SELECT id FROM trips WHERE fahrt_nr = ?", dep.Line.FahrtNr).Scan(&existingID)
|
||||
|
||||
if err == sql.ErrNoRows {
|
||||
id := uuid.New().String()
|
||||
|
|
Loading…
Reference in a new issue