def image_tag_delete(context, image_id, value, session=None):
 _check_image_id(image_id)
 session = (session or get_session())
 query = session.query(models.ImageTag).filter_by(image_id=image_id).filter_by(value=value).filter_by(deleted=False)
 try:
  tag_ref = query.one()
 except sa_orm.exc.NoResultFound:
  raise exception.NotFound()
 tag_ref.delete(session=session)

def image_tag_delete ( context , image_id , value , session = None ) : _check_image_id ( image_id ) session = ( session or get_session ( ) ) query = session . query ( models . ImageTag ) . filter_by ( image_id = image_id ) . filter_by ( value = value ) . filter_by ( deleted = False ) try : tag_ref = query . one ( ) except sa_orm . exc . NoResultFound : raise exception . NotFound ( ) tag_ref . delete ( session = session )
delete an image tag .