Skip to content

Commit 6219ec7

Browse files
jpmckinneyjarofgreen
authored andcommitted
use-titles: Use $ref'erring title if available
1 parent 1682c70 commit 6219ec7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- use-titles: Use $ref'erring title if available https://github.com/OpenDataServices/flatten-tool/pull/368
12+
913
## [0.15.2] - 2020-10-29
1014

1115
### Fixed

flattentool/schema.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,13 @@ def parse_schema_dict(
245245

246246
property_type_set = get_property_type_set(property_schema_dict)
247247

248-
title = property_schema_dict.get("title")
248+
if (
249+
hasattr(property_schema_dict, "__reference__")
250+
and "title" in property_schema_dict.__reference__
251+
):
252+
title = property_schema_dict.__reference__["title"]
253+
else:
254+
title = property_schema_dict.get("title")
249255
if title:
250256
title_lookup[title] = TitleLookup()
251257
title_lookup[title].property_name = property_name

0 commit comments

Comments
 (0)