def try_get_projects_and_repository(args):
    if args.project:
        repository = Repository.query.get(args.project.repository_id)
        return [args.project], repository
    elif args.repository:
        repository = args.repository
        projects = list(Project.query.options(
            subqueryload_all('plans'),
        ).filter(
            Project.status == ProjectStatus.active,
            Project.repository_id == repository.id,
        ))
        return projects, repository
    elif args['repository[phabricator.callsign]']:
        repository = args['repository[phabricator.callsign]']
        projects = list(Project.query.options(
            subqueryload_all('plans'),
        ).filter(
            Project.status == ProjectStatus.active,
            Project.repository_id == repository.id,
        ))
        return projects, repository
    else:
        return None, None
PUT an object.
dataset/ETHPy150Open dropbox/changes/changes/api/build_index.py/try_get_projects_and_repository--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/billing-export-python/cloudstorage/storage_api.py/_StorageApi.put_object_async