Skip to content

Commit

Permalink
iss #306 fix bug not recognising definitions items when properties ar…
Browse files Browse the repository at this point in the history
…e ending with _id
  • Loading branch information
BiancaMorandi committed Jan 18, 2023
1 parent fb64433 commit 65377d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brightwind/load/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def _get_title(property_name, schema, property_section=None):
"""
# search through definitions first
if schema.get('definitions') is not None:
if property_name in schema.get('definitions').keys():
return schema.get('definitions').get(property_name).get('title')
if property_name.split('_id')[0] in schema.get('definitions').keys():
return schema.get('definitions').get(property_name.split('_id')[0]).get('title')
# search through properties
if schema.get('properties') is not None:
# is property_name in the main properties
Expand Down

0 comments on commit 65377d3

Please sign in to comment.