Skip to content

Commit

Permalink
Update src/ophyd_async/epics/_backend/_aioca.py
Browse files Browse the repository at this point in the history
Co-authored-by: Tom C (DLS) <[email protected]>
  • Loading branch information
DiamondJoseph and coretl authored Mar 12, 2024
1 parent 08c48d2 commit d246166
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ophyd_async/epics/_backend/_aioca.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ def _data_key_from_augmented_value(value: AugmentedValue, **kwargs) -> DataKey:
shape=[] if scalar else [len(value)],
)
for key in _common_meta:
if hasattr(value, key):
attr = getattr(value, key)
if isinstance(attr, str) or not isnan(attr):
d[key] = attr
attr = getattr(value, key, nan)
if isinstance(attr, str) or not isnan(attr):
d[key] = attr

if value.datatype is dbr.DBR_ENUM:
d["choices"] = value.enums
Expand Down

0 comments on commit d246166

Please sign in to comment.