Skip to content

Commit

Permalink
feat(test-service): set default for current_alert_id to null if not a…
Browse files Browse the repository at this point in the history
…lert_id is provided
  • Loading branch information
harunbleech committed Apr 8, 2024
1 parent 53b826d commit f3ac10f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/services/class-test-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function update_test_from_comparison( $alert_id, $test_id, $data ) {
// Update test row with new id foreign key and add latest screenshot.
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- It's ok.
$update_data = [
'current_alert_id' => null,
'next_run_date' => $data['next_run_at'] ?? '',
'last_comparison_date' => $comparison['updated_at'],
'base_screenshot_url' => $comparison['screenshot']['image_url'],
Expand Down

0 comments on commit f3ac10f

Please sign in to comment.