Ejemplo n.º 1
0
def storymap_migrate_list(user):
    """Get list of storymaps that still need to be migrated"""
    try:
        credentials = google.get_credentials(user['google']['credentials'])
        drive_service = google.get_drive_service(credentials)

        existing = [d['title'] for (k, d) in user['storymaps'].items()]

        temp_list = google.drive_get_migrate_list(drive_service)
        migrate_list = [r for r in temp_list if r['title'] not in existing]

        return jsonify({'migrate_list': migrate_list})
    except Exception, e:
        traceback.print_exc()
        return jsonify({'error': str(e)})
Ejemplo n.º 2
0
def storymap_migrate_list(user):
    """Get list of storymaps that still need to be migrated"""
    try:
        credentials = google.get_credentials(user["google"]["credentials"])
        drive_service = google.get_drive_service(credentials)

        existing = [d["title"] for (k, d) in user["storymaps"].items()]

        temp_list = google.drive_get_migrate_list(drive_service)
        migrate_list = [r for r in temp_list if r["title"] not in existing]

        return jsonify({"migrate_list": migrate_list})
    except Exception, e:
        traceback.print_exc()
        return jsonify({"error": str(e)})