Skip to content

Commit b6d1081

Browse files
committed
Fix error when printing navigation property without partner value - Martin Miksik
1 parent 75100cb commit b6d1081

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3434
- Import error while using python version prior to 3.7 - Martin Miksik
3535
- Parsing datetime containing timezone information for python 3.6 and lower - Martin Miksik
3636
- Type hinting for ErrorPolicy's children - Martin Miksik
37+
- Error when printing navigation property without partner value - Martin Miksik
3738

3839
## [1.3.0]
3940

bin/pyodata

+4-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ def print_out_metadata_info(args, client):
4949
if client.schema.config.odata_version == ODataV2:
5050
print(f' + {prop.name}({prop.to_role.entity_type_name})')
5151
else:
52-
print(f' + {prop.name}({prop.partner.name})')
53-
52+
if prop.partner:
53+
print(f' + {prop.name}({prop.partner.name})')
54+
else:
55+
print(f' + {prop.name}')
5456
for fs in client.schema.function_imports:
5557
print(f'{fs.http_method} {fs.name}')
5658

0 commit comments

Comments
 (0)