Show More
@@ -589,11 +589,21 b' class Repository(Base, BaseModel):' | |||
|
589 | 589 | users_group_to_perm = relationship('UsersGroupRepoToPerm', cascade='all') |
|
590 | 590 | stats = relationship('Statistics', cascade='all', uselist=False) |
|
591 | 591 | |
|
592 | followers = relationship('UserFollowing', primaryjoin='UserFollowing.follows_repo_id==Repository.repo_id', cascade='all') | |
|
592 | followers = relationship('UserFollowing', | |
|
593 | primaryjoin='UserFollowing.follows_repo_id==Repository.repo_id', | |
|
594 | cascade='all') | |
|
593 | 595 | |
|
594 | 596 | logs = relationship('UserLog') |
|
595 | 597 | comments = relationship('ChangesetComment', cascade="all, delete, delete-orphan") |
|
596 | 598 | |
|
599 | pull_requests_org = relationship('PullRequest', | |
|
600 | primaryjoin='PullRequest.org_repo_id==Repository.repo_id', | |
|
601 | cascade="all, delete, delete-orphan") | |
|
602 | ||
|
603 | pull_requests_other = relationship('PullRequest', | |
|
604 | primaryjoin='PullRequest.other_repo_id==Repository.repo_id', | |
|
605 | cascade="all, delete, delete-orphan") | |
|
606 | ||
|
597 | 607 | def __unicode__(self): |
|
598 | 608 | return u"<%s('%s:%s')>" % (self.__class__.__name__, self.repo_id, |
|
599 | 609 | self.repo_name) |
@@ -1528,8 +1538,6 b' class PullRequest(Base, BaseModel):' | |||
|
1528 | 1538 | other_repo_id = Column('other_repo_id', Integer(), ForeignKey('repositories.repo_id'), nullable=False) |
|
1529 | 1539 | other_ref = Column('other_ref', Unicode(256), nullable=False) |
|
1530 | 1540 | |
|
1531 | statuses = relationship('ChangesetStatus') | |
|
1532 | ||
|
1533 | 1541 | @hybrid_property |
|
1534 | 1542 | def revisions(self): |
|
1535 | 1543 | return self._revisions.split(':') |
@@ -1539,9 +1547,13 b' class PullRequest(Base, BaseModel):' | |||
|
1539 | 1547 | self._revisions = ':'.join(val) |
|
1540 | 1548 | |
|
1541 | 1549 | author = relationship('User', lazy='joined') |
|
1542 |
reviewers = relationship('PullRequestReviewers' |
|
|
1550 | reviewers = relationship('PullRequestReviewers', | |
|
1551 | cascade="all, delete, delete-orphan") | |
|
1543 | 1552 | org_repo = relationship('Repository', primaryjoin='PullRequest.org_repo_id==Repository.repo_id') |
|
1544 | 1553 | other_repo = relationship('Repository', primaryjoin='PullRequest.other_repo_id==Repository.repo_id') |
|
1554 | statuses = relationship('ChangesetStatus') | |
|
1555 | comments = relationship('ChangesetComment', | |
|
1556 | cascade="all, delete, delete-orphan") | |
|
1545 | 1557 | |
|
1546 | 1558 | def is_closed(self): |
|
1547 | 1559 | return self.status == self.STATUS_CLOSED |
General Comments 0
You need to be logged in to leave comments.
Login now