refactor(go): stop duplicate mileage history writes
This commit is contained in:
@@ -369,9 +369,9 @@ func (r *LocationRepository) tableName() string {
|
||||
|
||||
func (r *MileagePointRepository) tableName() string {
|
||||
if r.database == "" {
|
||||
return "vehicle_mileage_points"
|
||||
return "vehicle_locations"
|
||||
}
|
||||
return r.database + ".vehicle_mileage_points"
|
||||
return r.database + ".vehicle_locations"
|
||||
}
|
||||
|
||||
func normalizeRawFrameQuery(query RawFrameQuery) RawFrameQuery {
|
||||
@@ -676,7 +676,7 @@ func locationWhere(query LocationQuery) []string {
|
||||
}
|
||||
|
||||
func mileagePointWhere(query MileagePointQuery) []string {
|
||||
var where []string
|
||||
where := []string{"total_mileage_km IS NOT NULL"}
|
||||
add := func(clause string) {
|
||||
where = append(where, clause)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user