fix get_image_archive and web archiveinfo handler for non-images

This commit is contained in:
Mike McLean 2013-01-14 09:12:34 -05:00
parent fcd7b57e39
commit 5d8331cd49
2 changed files with 3 additions and 1 deletions

View file

@ -3789,6 +3789,8 @@ def get_image_archive(archive_id, strict=False):
select = """SELECT %s FROM image_archives
WHERE archive_id = %%(archive_id)i""" % ', '.join(fields)
results = _singleRow(select, locals(), fields, strict=strict)
if not results:
return None
results['rootid'] = False
fields = ('image_id', 'rpm_id')
select = """SELECT %s FROM image_listing

View file

@ -137,7 +137,7 @@
#end if
</td>
</tr>
#if $archive.rootid
#if 'rootid' in $archive and $archive.rootid
<tr>
<th colspan="2"><a href="rpmlist?imageID=$archive.id&amp;type=image" title="RPMs that where installed to the image">Installed RPMs</a></th>
</tr>