fix warning for datasets without modifications
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Jun 2010 14:18:45 +0000 (16:18 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Jun 2010 14:18:45 +0000 (16:18 +0200)
lib/MojoFacets/Data.pm

index 373e9a1..8bf9aa3 100644 (file)
@@ -253,7 +253,7 @@ sub _loaded {
        my $path = $self->session('path') || $self->param('path');
        $self->redirect_to('/data/index') unless $path;
 
-       if ( $loaded->{$path}->{modified} > 1 ) {
+       if ( defined $loaded->{$path}->{modified} && $loaded->{$path}->{modified} > 1 ) {
                my $caller = (caller(1))[3];
                if ( $caller =~ m/::edit/ ) {
                        warn "rebuild stats for $path ignored caller $caller\n";