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)})
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)})