weather fixed
This commit is contained in:
@@ -414,9 +414,12 @@ def save_trade_settings(input_settings):
|
||||
api_caller.sendline('f')
|
||||
|
||||
def save_weather_settings(input_settings):
|
||||
|
||||
print(input_settings)
|
||||
|
||||
|
||||
filename = 'current_weather.json' if input_settings['feature'] == 'Current Weather' else 'daily_weather.json'
|
||||
print(filename)
|
||||
|
||||
current_settings = json.load(open('csv/' + filename, 'r'))
|
||||
|
||||
@@ -431,8 +434,10 @@ def save_weather_settings(input_settings):
|
||||
if input_settings['feature'] == 'Daily Forecast':
|
||||
current_settings['current_weather'] = input_settings['current_weather']
|
||||
|
||||
|
||||
current_settings = combine_dict(current_settings, input_settings['locations'], 'locations')
|
||||
locations = {}
|
||||
for key in input_settings['locations']:
|
||||
locations[key] = []
|
||||
current_settings['locations'] = locations
|
||||
|
||||
json.dump(current_settings, open('csv/' + filename, 'w+'))
|
||||
|
||||
|
Reference in New Issue
Block a user