Skip to content

Commit

Permalink
Added nil checks on person deleted field
Browse files Browse the repository at this point in the history
  • Loading branch information
droberts-ctrlo committed Dec 18, 2024
1 parent 5e08d47 commit e8a2d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/GADS/Datum/Person.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ use Log::Report 'linkspace';
use Moo;
use MooX::Types::MooseLike::Base qw/:all/;
use namespace::clean;
use GADS::DateTime;

extends 'GADS::Datum';

with 'GADS::Role::Presentation::Datum::Person';
with 'GADS::DateTime';

after set_value => sub {
my ($self, $value, %options) = @_;
Expand Down Expand Up @@ -379,7 +379,7 @@ sub _build_for_code
team => $_->{team},
title => $_->{title},
text => $_->{value},
deleted => GADS::DateTime::parse_datetime($_->{deleted})->epoch,
deleted => GADS::DateTime::parse_datetime($_->{deleted}) ? GADS::DateTime::parse_datetime($_->{deleted})->epoch : undef,
}
} @{$self->value_hash};

Expand Down

0 comments on commit e8a2d1b

Please sign in to comment.