Skip to content

Commit

Permalink
Fix None handling
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed May 30, 2024
1 parent d1851bc commit addfb47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trailblazer/store/crud/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,11 @@ def cancel_ongoing_analysis(
LOG.info(f"Case {analysis.case_id} - Analysis {analysis.id}: cancelled successfully!")
self.update_run_status(analysis_id=analysis_id, analysis_host=analysis_host)
analysis.status = TrailblazerStatus.CANCELLED
analysis.comment += (
new_comment: str = (
f"Analysis cancelled manually by user:"
f" {(self.get_user(email=email).name if self.get_user(email=email) else (email or 'Unknown'))}!"
)
analysis.comment = analysis.comment + new_comment if analysis.comment else new_comment
session: Session = get_session()
session.commit()

Expand Down

0 comments on commit addfb47

Please sign in to comment.