Skip to content

Commit

Permalink
fix: handle null study download url
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Feb 9, 2024
1 parent f788f74 commit 7352381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/FileSystemObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class FileSystemObject extends Model
public function getDownloadUrlAttribute()
{
if ($this->model_type == 'study') {
return $this->study->download_url;
return $this->study ? $this->study->download_url : null;
}
}

Expand Down

0 comments on commit 7352381

Please sign in to comment.