yuki-kimoto / gitprep

Portable GitHub system into your own server
http://gitprep.yukikimoto.com/
912 stars 117 forks source link

fix: Issue #117 (labels not generated for new repositories) #119

Closed socialmedialabs closed 8 years ago

socialmedialabs commented 8 years ago

In /templates/issues.html.ep on line 47 the query checks for any available labels, regardless if these labels belong to the particular project or not:

my $labels_count = app->dbi->model('label')->select('count(*)')->value;

Changing the query to the following fixes the problem:

my $labels_count = app->dbi->model('label')->select('count(*)', where => {'project.id' => $project_id})->value;