##// END OF EJS Templates
fix(db-models): fixed sqlalchemy warnings in DB models.
super-admin -
r5293:64e9d258 default
parent child Browse files
Show More
@@ -1779,13 +1779,13 b' class Repository(Base, BaseModel):'
1779 'PullRequest',
1779 'PullRequest',
1780 primaryjoin='PullRequest.source_repo_id==Repository.repo_id',
1780 primaryjoin='PullRequest.source_repo_id==Repository.repo_id',
1781 cascade="all, delete-orphan",
1781 cascade="all, delete-orphan",
1782 #back_populates="pr_source"
1782 overlaps="source_repo"
1783 )
1783 )
1784 pull_requests_target = relationship(
1784 pull_requests_target = relationship(
1785 'PullRequest',
1785 'PullRequest',
1786 primaryjoin='PullRequest.target_repo_id==Repository.repo_id',
1786 primaryjoin='PullRequest.target_repo_id==Repository.repo_id',
1787 cascade="all, delete-orphan",
1787 cascade="all, delete-orphan",
1788 #back_populates="pr_target"
1788 overlaps="target_repo"
1789 )
1789 )
1790
1790
1791 ui = relationship('RepoRhodeCodeUi', cascade="all")
1791 ui = relationship('RepoRhodeCodeUi', cascade="all")
@@ -4303,7 +4303,7 b' class _PullRequestBase(BaseModel):'
4303 return relationship(
4303 return relationship(
4304 'Repository',
4304 'Repository',
4305 primaryjoin=f'{cls.__name__}.source_repo_id==Repository.repo_id',
4305 primaryjoin=f'{cls.__name__}.source_repo_id==Repository.repo_id',
4306 #back_populates=''
4306 overlaps="pr_source"
4307 )
4307 )
4308
4308
4309 @property
4309 @property
@@ -4314,7 +4314,8 b' class _PullRequestBase(BaseModel):'
4314 def target_repo(cls):
4314 def target_repo(cls):
4315 return relationship(
4315 return relationship(
4316 'Repository',
4316 'Repository',
4317 primaryjoin=f'{cls.__name__}.target_repo_id==Repository.repo_id'
4317 primaryjoin=f'{cls.__name__}.target_repo_id==Repository.repo_id',
4318 overlaps="pr_target"
4318 )
4319 )
4319
4320
4320 @property
4321 @property
General Comments 0
You need to be logged in to leave comments. Login now