Skip to content

Commit

Permalink
comparing objects obviously does not work as expected...
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Jan 26, 2025
1 parent b6affd9 commit 380193f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Resources/Models/Utils/PreComputedPhotoData.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public function __construct(Photo $photo)
$this->is_camera_date = $photo->taken_at !== null;
$this->has_exif = $this->genExifHash($photo) !== '';
$this->has_location = $this->has_location($photo);
$this->is_taken_at_modified = $photo->taken_at !== $photo->initial_taken_at;
// if taken_at is null, it is for sure not modified.
$this->is_taken_at_modified = $photo->taken_at?->notEqualTo($photo->initial_taken_at) ?? false;
}

private function has_location(Photo $photo): bool
Expand Down

0 comments on commit 380193f

Please sign in to comment.