Merge pull request #1203 from fernandog/patch-3

Check if list_remote_branches is empty before for-loop
This commit is contained in:
echel0n 2015-01-29 14:35:12 -08:00
commit 89fa3e9713
1 changed files with 2 additions and 0 deletions

View File

@ -550,9 +550,11 @@
<span class="component-title">Branch version:</span>
<span class="component-desc">
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
#if $sickbeard.versionCheckScheduler.action.list_remote_branches()
#for $cur_branch in $sickbeard.versionCheckScheduler.action.list_remote_branches():
<option value="$cur_branch" #if $cur_branch == $sickbeard.BRANCH then 'selected="selected"' else ''#>$cur_branch</option>
#end for
#end if
</select>
<input class="btn btn-inline" style="margin-left: 6px;" type="button" id="branchCheckout" value="Checkout Branch">
<div class="clear-left"><p>select branch to use (restart required)</p></div>