Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Jun 27, 2024
2 parents e10c840 + fbea81c commit f5a4ea3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions myems-api/core/microgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ def on_get(req, resp, id_):

query = (" SELECT id, name, uuid, "
" address, postal_code, latitude, longitude, rated_capacity, rated_power, "
" contact_id, cost_center_id, serial_number, svg_id, is_cost_data_displayed, phase_of_lifecycle, "
" description "
" contact_id, cost_center_id, serial_number, svg_id, is_cost_data_displayed, "
" phase_of_lifecycle, description "
" FROM tbl_microgrids "
" WHERE id = %s ")
cursor.execute(query, (id_,))
Expand Down Expand Up @@ -548,7 +548,7 @@ def on_put(req, resp, id_):
not isinstance(new_values['data']['phase_of_lifecycle'], str) or \
len(str.strip(new_values['data']['phase_of_lifecycle'])) == 0:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_ENERGY_STORAGE_POWER_STATION_PHASE_OF_LIFECYCLE')
description='API.INVALID_MICROGRID_PHASE_OF_LIFECYCLE')
phase_of_lifecycle = str.strip(new_values['data']['phase_of_lifecycle'])

if 'description' in new_values['data'].keys() and \
Expand Down

0 comments on commit f5a4ea3

Please sign in to comment.