Skip to content

Commit f548c83

Browse files
committed
Fix 500 on content pages for people with negative upload bandwidth
1 parent f3a4af0 commit f548c83

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/views/content/form/_panel.html.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
<h5>
1010
Upload more images
1111
<small class="grey-text">
12-
You have <%= Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty %> of bandwidth remaining.
12+
<% if current_user.upload_bandwidth_kb > 0 %>
13+
You have <%= Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty %> of bandwidth remaining.
14+
<% else %>
15+
You have no upload bandwidth remaining. Upgrade to Premium or delete some existing images for more.
16+
<% end %>
1317
</small>
1418
</h5>
1519
</div>

0 commit comments

Comments
 (0)