Showing 1 changed files with 10 additions and 2 deletions
+10 -2
templates/auto/_search.html.ep
... ...
@@ -89,7 +89,11 @@
89 89
               % my $project = $project->{name};
90 90
               % my $rev = app->manager->default_branch($user, $project);
91 91
               % my $desc = app->git->description($user, $project);
92
-              % my $commit = app->git->get_commit($user, $project, $rev);
92
+              % my $branches = app->git->branches($user, $project);
93
+              % my $commit;
94
+              % if (@$branches) {
95
+                % $commit = app->git->get_commit($user, $project, $rev);
96
+              % }
93 97
               
94 98
               <div>
95 99
                 <div>
... ...
@@ -99,7 +103,11 @@
99 103
                   <span style="font-size:15px;color:#333333"><%= $desc %></span>
100 104
                 </div>
101 105
                 <div>
102
-                  <span style="font-size:13px" class="muted" title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
106
+                  % if ($commit) {
107
+                    <span style="font-size:13px" class="muted" title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span>
108
+                  % } else {
109
+                    <span style="font-size:13px" class="muted">Repositry is not yet created.</span>
110
+                  % }
103 111
                 </div>
104 112
                 <hr style="margin:10px 0;padding:0">
105 113
               </div>