Skip to content

Commit

Permalink
make BDDLEntity state getter automatically return False by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cremebrule committed Aug 29, 2023
1 parent 4fa28d3 commit aa5a924
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omnigibson/utils/bddl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ def get_state(self, state, *args, **kwargs):
**kwargs (dict): Any keyword arguments to pass to getter, in order
Returns:
None or any: Returned value(s) from @state if self.wrapped_obj exists (i.e.: not None), else None
any: Returned value(s) from @state if self.wrapped_obj exists (i.e.: not None), else False
"""
return self.wrapped_obj.states[state].get_value(*args, **kwargs) if self.exists else None
return self.wrapped_obj.states[state].get_value(*args, **kwargs) if self.exists else False

def set_state(self, state, *args, **kwargs):
"""
Expand Down

0 comments on commit aa5a924

Please sign in to comment.