Merge pull request #2839 from charltonaustin/fix_bug_repository_v2_2

fix(repository_models_pre_oci): fixed how we called a field
This commit is contained in:
Charlton Austin 2017-07-28 15:36:59 -04:00 committed by GitHub
commit dd69fd66ce

View file

@ -11,8 +11,8 @@ MAX_DAYS_IN_3_MONTHS = 92
REPOS_PER_PAGE = 100
def create_channel(channel, releases_channels_map):
releases_channels_map[channel.linked_tag_name].append(channel.name)
def _create_channel(channel, releases_channels_map):
releases_channels_map[channel.linked_tag.name].append(channel.name)
return Channel(channel.name, channel.linked_tag.name, channel.linked_tag.lifetime_start)
@ -148,7 +148,7 @@ class PreOCIModel(RepositoryDataInterface):
releases = oci_model.release.get_release_objs(repo)
releases_channels_map = defaultdict(list)
return ApplicationRepository(
base, [create_channel(channel, releases_channels_map) for channel in channels], [
base, [_create_channel(channel, releases_channels_map) for channel in channels], [
Release(release.name, release.lifetime_start, releases_channels_map)
for release in releases
])