| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -47,7 +47,7 @@ def main ( | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            previous_views_count: int | None = ( | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    VideoHistory | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    .where_has ('videos', lambda q, code = code: q.where ('code', code)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    .where_has ('video', lambda q, code = code: q.where ('code', code)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    .where ('fetched_at', '<', latest_fetched_at) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    .max ('views_count')) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if previous_views_count is None: | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |