Skip to content

Commit

Permalink
ensure shape key is the upper-cased id
Browse files Browse the repository at this point in the history
  • Loading branch information
meguiraun committed Oct 9, 2024
1 parent 2727a64 commit 348aa9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mxcubeweb/core/components/sampleview.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ def get_shapes(self):
for shape in HWR.beamline.sample_view.get_shapes():
s = shape.as_dict()
shape_dict.update({shape.id: s})

return {"shapes": to_camel(shape_dict)}
# shape key comes case lowered from the to_camel (2dp1), this breaks ui
# lest ensure it upper case by only came casing the dict data
_shape = {shape.id: to_camel(shape_dict[shape.id])}
return {"shapes": _shape}

def get_shape_width_sid(self, sid):
shape = HWR.beamline.sample_view.get_shape(sid)
Expand Down

0 comments on commit 348aa9e

Please sign in to comment.