Revision 244c552b snf-app/synnefo/api/util.py

b/snf-app/synnefo/api/util.py
177 177
    try:
178 178
        image_id = int(image_id)
179 179
        image = Image.objects.get(id=image_id)
180
        if not image.public and image.owner != owner:
180
        if not image.public and image.userid != owner:
181 181
            raise ItemNotFound('Image not found.')
182 182
        return image
183 183
    except ValueError:

Also available in: Unified diff