Skip to content

Commit

Permalink
Fix JSON comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 6, 2024
1 parent 1873716 commit 75ab294
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions github_app_geo_project/views/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,15 @@ def process_event(context: ProcessContext) -> None:
elif key == "event_name":
update = update.where(models.Queue.event_name == event_name)
elif key == "event_data":
update = update.where(models.Queue.event_data == context.event_data)
update = update.where(
sqlalchemy.cast(models.Queue.event_data, sqlalchemy.TEXT)
== sqlalchemy.cast(context.event_data, sqlalchemy.TEXT)
)
elif key == "module_data":
update = update.where(models.Queue.module_data == module_data)
update = update.where(
sqlalchemy.cast(models.Queue.module_data, sqlalchemy.TEXT)
== sqlalchemy.cast(module_data, sqlalchemy.TEXT)
)
else:
_LOGGER.error("Unknown jobs_unique_on key: %s", key)

Expand Down

0 comments on commit 75ab294

Please sign in to comment.