Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

Only top-level posts can be resolved

by roundabout, Wednesday, 17 July 2024, 11:45:15 (1721216715), pushed by roundabout, Wednesday, 31 July 2024, 06:54:51 (1722408891)

Author identity: vlad <vlad.muntoiu@gmail.com>

938289ab9a4bd8ca1771fe9e6a6937984c99e152

models.py

@@ -462,7 +462,7 @@ with (app.app_context()):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            db.session.delete(PullRequestResolvesThread.query.filter_by(pr=self, post=post).first())
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        for post in link_to:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        if post not in resolved_posts and post is not None:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        if post not in resolved_posts and post is not None and not post.parent:    # only top-level posts can be resolved
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                db.session.add(PullRequestResolvesThread(self, post))
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        db.session.commit()