summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-09-23 05:49:28 +0200
committerByron Jones <glob@mozilla.com>2015-09-23 05:49:28 +0200
commit2e425408eeb1065eacb4bcded2cc88d05a689e1c (patch)
treee16cbe23bb6f583a31e753ddff2883fc25f63a2f
parent31142e4bc681d58e14a7fd739edcdb456d5f733d (diff)
downloadbugzilla-2e425408eeb1065eacb4bcded2cc88d05a689e1c.tar.gz
bugzilla-2e425408eeb1065eacb4bcded2cc88d05a689e1c.tar.xz
Bug 1204645 - fix error generated by users who have never logged in
-rw-r--r--extensions/BMO/lib/Reports/Groups.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/BMO/lib/Reports/Groups.pm b/extensions/BMO/lib/Reports/Groups.pm
index 87aa14a0c..240feb5cc 100644
--- a/extensions/BMO/lib/Reports/Groups.pm
+++ b/extensions/BMO/lib/Reports/Groups.pm
@@ -264,8 +264,9 @@ sub _filter_userlist {
my ($list, $include_disabled) = @_;
$list = [ grep { $_->is_enabled } @$list ] unless $include_disabled;
my $now = DateTime->now();
+ my $never = DateTime->from_epoch( epoch => 0 );
foreach my $user (@$list) {
- my $last_seen = datetime_from($user->last_seen_date);
+ my $last_seen = datetime_from($user->last_seen_date) // $never;
$user->{last_seen_days} = sprintf(
'%.0f',
$now->subtract_datetime_absolute($last_seen)->delta_seconds / (28 * 60 * 60));