Skip to content

Commit

Permalink
feat: treat cases where the str is an small number: ¹
Browse files Browse the repository at this point in the history
  • Loading branch information
helllllllder committed Jun 19, 2024
1 parent 6b38687 commit 86e4fac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion flowrun/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ def flowrun_sql_to_elasticsearch_transformer(
new_obj["value"] = value

if value.isdigit():
new_obj["value_number"] = float(value)
try:
new_obj["value_number"] = float(value)
except ValueError:
pass

new_results.append(new_obj)
es_flow_run.pop("results", None)
Expand Down
2 changes: 1 addition & 1 deletion shared/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def execute(self):
else self.storage_org.list_active()
)
for org in orgs:
org_id = org if type(org) == int else org.get("id")
org_id = org if type(org) is int else org.get("id")

# Get last indexed timestamp document on the storage_to
last_indexed_at = self.storage_to.get_last_indexed_timestamp(org_id)
Expand Down

0 comments on commit 86e4fac

Please sign in to comment.