File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -920,10 +920,13 @@ func configureTariffs(conf *globalconfig.Tariffs) (*tariff.Tariffs, error) {
920920 eg .Go (func () error { return configureTariff (api .TariffUsageFeedIn , conf .FeedIn , & tariffs .FeedIn ) })
921921 eg .Go (func () error { return configureTariff (api .TariffUsageCo2 , conf .Co2 , & tariffs .Co2 ) })
922922 eg .Go (func () error { return configureTariff (api .TariffUsagePlanner , conf .Planner , & tariffs .Planner ) })
923- if len (conf .Solar ) == 1 {
924- eg .Go (func () error { return configureTariff (api .TariffUsageSolar , conf .Solar [0 ], & tariffs .Solar ) })
925- } else {
926- eg .Go (func () error { return configureSolarTariff (conf .Solar , & tariffs .Solar ) })
923+ if len (conf .Solar ) > 0 {
924+ eg .Go (func () error {
925+ if len (conf .Solar ) == 1 {
926+ return configureTariff (api .TariffUsageSolar , conf .Solar [0 ], & tariffs .Solar )
927+ }
928+ return configureSolarTariff (conf .Solar , & tariffs .Solar )
929+ })
927930 }
928931
929932 if err := eg .Wait (); err != nil {
You can’t perform that action at this time.
0 commit comments