Skip to content

Commit

Permalink
Fix modeling bug (#143)
Browse files Browse the repository at this point in the history
* fix bug where patching an invalid model would throw error

* Update CHANGELOG.md
  • Loading branch information
a-s-g93 authored Oct 31, 2024
1 parent 7201dde commit 3358139
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixed

* Fix bug where patching previous valid nodes into an invalid data model would throw an error

### Changed

* Add comma separator for numbers in `GraphEDA` report
Expand Down
10 changes: 8 additions & 2 deletions neo4j_runway/llm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,14 @@ def _get_initial_data_model_response(
apply_neo4j_naming_conventions=apply_neo4j_naming_conventions,
)

if not hasattr(initial_data_model, "nodes") and hasattr(nodes, "nodes"):
initial_data_model.nodes = nodes.nodes
if (
not hasattr(initial_data_model, "nodes") or initial_data_model.nodes is None
) and hasattr(nodes, "nodes"):
try:
print(initial_data_model)
initial_data_model.nodes = nodes.nodes
except Exception as e:
pass

return initial_data_model

Expand Down

0 comments on commit 3358139

Please sign in to comment.