bugfix: respect unit aliases
This commit is contained in:
parent
dcb566275c
commit
9264bba243
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ class Units:
|
|||
|
||||
def get(self, name: str) -> Optional[Unit]:
|
||||
for unit in self.units:
|
||||
if unit["name"] == name:
|
||||
if unit["name"] == name or "aliases" in unit and name in unit["aliases"]:
|
||||
return unit
|
||||
raise RuntimeError(f"unit {name} not found")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue