'Sets movie identifiers'

@api.validate(model=input_movie_list_id_schema, description=movie_identifiers_doc)
@api.response(200, model=movie_list_object_schema)
@api.response(BadRequest)
@api.doc(description=u'Sent    movie    identifiers    will    override    any    existing    identifiers    that    the    movie    currently    holds')
def put(self, list_id, movie_id, session=None):

    try:
        movie = ml.get_movie_by_id(list_id=list_id, movie_id=movie_id, session=session)
    except NoResultFound:
        raise NotFoundError((u'could    not    find    movie    with    id    %d    in    list    %d' % (movie_id, list_id)))
    data = request.json
    for id_name in data:
        if (list(id_name)[0] not in MovieListBase().supported_ids):
            raise BadRequest((u'movie    identifier    %s    is    not    allowed' % id_name))
    movie.ids[:] = ml.get_db_movie_identifiers(identifier_list=data, movie_id=movie_id, session=session)
    session.commit()
    return jsonify(movie.to_dict())
