@staticmethod
def _get_and_bump_build_id(data):
    """ return id for next build id and increment the one in DB """
    next_build_id = data['next_build_id']
    data['next_build_id'] += 1
    if not data['builds'].get(str(next_build_id)):
        return str(next_build_id)
    else:
        raise Exception(
            f'Database seems to be corrupted. Build {next_build_id} already exists.'
            )
