Skip to content

Commit

Permalink
Fix app history for store apps
Browse files Browse the repository at this point in the history
  • Loading branch information
vegito22 committed Oct 22, 2024
1 parent b645965 commit 95ade6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llmstack/apps/jobs/app_run_finished.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def processor_runs(self):


def persist_app_run_history(event_data: AppRunFinishedEventData):
owner = App.objects.get(uuid=event_data.request_app_uuid).owner
owner = App.objects.get(uuid=event_data.request_app_uuid).owner if event_data.request_app_uuid else None

run_entry = RunEntry(
request_uuid=event_data.request_uuid,
Expand Down Expand Up @@ -135,5 +135,5 @@ def persist_app_run_history(event_data: AppRunFinishedEventData):
update_billing_func(
usage_metrics=event_data.usage_metrics,
usage_data=MetadataSerializer(run_entry).data,
user_email=owner.email,
user_email=owner.email if owner else event_data.request_user_email,
)

0 comments on commit 95ade6b

Please sign in to comment.