def get_user_review_id(user, paper):
    """
    Returns id of a review written by given user for the given paper
    :param user: User object
    :param paper: Paper object
    :return: integer (id of a review)
    """
    for review in paper.review_set.all():
        if review.author == user:
            return review.pk