Changeset - 81a17ef4afc0
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-07-26 22:08:26
marcin@python-works.com
cascade delete comments when deleting repo, else it's a error preventing deletion
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/db.py
Show inline comments
 
@@ -589,13 +589,13 @@ class Repository(Base, BaseModel):
 
    users_group_to_perm = relationship('UsersGroupRepoToPerm', cascade='all')
 
    stats = relationship('Statistics', cascade='all', uselist=False)
 

	
 
    followers = relationship('UserFollowing', primaryjoin='UserFollowing.follows_repo_id==Repository.repo_id', cascade='all')
 

	
 
    logs = relationship('UserLog')
 
    comments = relationship('ChangesetComment')
 
    comments = relationship('ChangesetComment', cascade="all, delete, delete-orphan")
 

	
 
    def __unicode__(self):
 
        return u"<%s('%s:%s')>" % (self.__class__.__name__, self.repo_id,
 
                                   self.repo_name)
 

	
 
    @classmethod
0 comments (0 inline, 0 general)