Skip to content

Commit

Permalink
Fix report crash issue (#1502)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregKaleka authored Nov 27, 2024
1 parent 765a5b7 commit c6bf4b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 1 addition & 6 deletions libraries/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ def get_template_names(self):
return [self.form_template]
if form.cleaned_data["no_cache"]:
return [self.form_template]
content = form.cache_get()
if content:
if not content.content_html:
return [self.polling_template]
else:
return [self.polling_template]
return [self.polling_template]

def get_form(self):
data = None
Expand Down
6 changes: 5 additions & 1 deletion libraries/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,11 @@ def apply_colors(self):
Graph.weeks.days.
"""
high = self.max
if not (high := self.max):
# No commits this release
# TODO: we may want a more elegant solution
# than just not graphing this library
return
for week in self.weeks:
for day in week.days:
decimal = day.count / high
Expand Down

0 comments on commit c6bf4b1

Please sign in to comment.