(self, *args, **kwargs)
| 99 | def decorator(fn): |
| 100 | @wraps(fn) |
| 101 | def wrapper(self, *args, **kwargs): |
| 102 | state = inspect(self) |
| 103 | for field in fields: |
| 104 | attr_state = state.attrs.get(field) |
| 105 | try: |
| 106 | assert attr_state is not None |
| 107 | assert hasattr(attr_state, 'loaded_value') |
| 108 | assert attr_state.loaded_value is not LoaderCallableStatus.NO_VALUE |
| 109 | except AssertionError: |
| 110 | raise RuntimeError(f"relationship '{field}' not loaded for {self.__class__.__name__}") |
| 111 | |
| 112 | return fn(self, *args, **kwargs) |
| 113 | |
| 114 | return wrapper |
| 115 |
nothing calls this directly
no test coverage detected
searching dependent graphs…