Show More
@@ -1379,10 +1379,11 b' class Repository(Base, BaseModel):' | |||||
1379 | if cls == item_cls and instance.repo_name == repo_name: |
|
1379 | if cls == item_cls and instance.repo_name == repo_name: | |
1380 | exist_in_session.append(instance) |
|
1380 | exist_in_session.append(instance) | |
1381 | if exist_in_session: |
|
1381 | if exist_in_session: | |
1382 |
if len(exist_in_session) |
|
1382 | if len(exist_in_session) == 1: | |
1383 | raise Exception('2 same name repos in session') |
|
1383 | return exist_in_session[0] | |
1384 | return exist_in_session[0] |
|
1384 | log.exception( | |
1385 |
|
1385 | 'multiple repos with same name: %r' % exist_in_session) | ||
|
1386 | ||||
1386 | q = session.query(cls).filter(cls.repo_name == repo_name) |
|
1387 | q = session.query(cls).filter(cls.repo_name == repo_name) | |
1387 | return q.scalar() |
|
1388 | return q.scalar() | |
1388 |
|
1389 |
General Comments 0
You need to be logged in to leave comments.
Login now