fix hidden themes page
This commit is contained in:
		
							parent
							
								
									79a0c255cf
								
							
						
					
					
						commit
						70d4f84679
					
				| @ -64,11 +64,8 @@ def build_page(hidden_themes): | |||||||
|     table = MarkdownUtils.MarkdownTable(["Date", "Films", "Hidden Themes"]) |     table = MarkdownUtils.MarkdownTable(["Date", "Films", "Hidden Themes"]) | ||||||
| 
 | 
 | ||||||
|     for date, data in hidden_themes.items(): |     for date, data in hidden_themes.items(): | ||||||
|         table += "\n" |         films = VCinemaUtils.get_film_list(data['viewings']) | ||||||
| 
 | 
 | ||||||
|         row_data = [] |  | ||||||
|         row_data.append(str(date)) |  | ||||||
|         row_data.append(VCinemaUtils.get_film_list(data['viewings'])) |  | ||||||
|         if 'hidden_themes' in data and data['hidden_themes'] != {}: |         if 'hidden_themes' in data and data['hidden_themes'] != {}: | ||||||
|             hidden_theme_labels = [] |             hidden_theme_labels = [] | ||||||
| 
 | 
 | ||||||
| @ -78,10 +75,11 @@ def build_page(hidden_themes): | |||||||
|                 else: |                 else: | ||||||
|                     hidden_theme_labels.append("<i>{} ({}%)</i>".format(hidden_theme, round(data['hidden_themes'][hidden_theme] * 100))) |                     hidden_theme_labels.append("<i>{} ({}%)</i>".format(hidden_theme, round(data['hidden_themes'][hidden_theme] * 100))) | ||||||
| 
 | 
 | ||||||
|             row_data.append("<br>".join(hidden_theme_labels)) |             hidden_themes = "<br>".join(hidden_theme_labels) | ||||||
|         else: |         else: | ||||||
|             row_data.append("N/A") |             hidden_themes = "N/A" | ||||||
| 
 | 
 | ||||||
|  |         row_data = [date, films, hidden_themes] | ||||||
|         table.add_row(row_data) |         table.add_row(row_data) | ||||||
| 
 | 
 | ||||||
|     return table |     return str(table) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sarah
						Sarah