Phase 1 of migrating APPR-specific tables to tables with the Appr
prefix
Fixes https://jira.coreos.com/browse/QUAY-950
This commit is contained in:
parent
6622f27c93
commit
113bb96f29
28 changed files with 699 additions and 176 deletions
|
@ -3,7 +3,9 @@ from collections import defaultdict
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
from auth.permissions import ReadRepositoryPermission
|
||||
from data import model, appr_model
|
||||
from data import model
|
||||
from data.appr_model import channel as channel_model, release as release_model
|
||||
from endpoints.appr.models_cnr import model as appr_model
|
||||
from endpoints.api.repository_models_interface import RepositoryDataInterface, RepositoryBaseElement, Repository, \
|
||||
ApplicationRepository, ImageRepositoryRepository, Tag, Channel, Release, Count
|
||||
|
||||
|
@ -143,8 +145,8 @@ class PreOCIModel(RepositoryDataInterface):
|
|||
False, False, False)
|
||||
|
||||
if base.kind_name == 'application':
|
||||
channels = appr_model.channel.get_repo_channels(repo)
|
||||
releases = appr_model.release.get_release_objs(repo)
|
||||
channels = channel_model.get_repo_channels(repo, appr_model.models_ref)
|
||||
releases = release_model.get_release_objs(repo, appr_model.models_ref)
|
||||
releases_channels_map = defaultdict(list)
|
||||
return ApplicationRepository(
|
||||
base, [_create_channel(channel, releases_channels_map) for channel in channels], [
|
||||
|
|
Reference in a new issue