Skip to content

Commit

Permalink
Fixes nullable integration
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Feb 23, 2022
1 parent 55a0319 commit 91014bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Database/Models/Revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class Revision extends Model
*/
public function getNewValueAttribute($value)
{
if ($value === null) {
return null;
}

if ($this->cast === 'date') {
return $this->asDateTime($value);
}
Expand All @@ -32,6 +36,10 @@ public function getNewValueAttribute($value)
*/
public function getOldValueAttribute($value)
{
if ($value === null) {
return null;
}

if ($this->cast === 'date') {
return $this->asDateTime($value);
}
Expand Down

0 comments on commit 91014bc

Please sign in to comment.