mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
fix: test
This commit is contained in:
parent
914a89b66c
commit
7d15094f9c
3 changed files with 8 additions and 9 deletions
|
@ -47,7 +47,7 @@ use uuid::Uuid;
|
|||
|
||||
pub(crate) struct ImportedFolder {
|
||||
pub imported_session: Session,
|
||||
pub imported_collab_db: Weak<CollabKVDB>,
|
||||
pub imported_collab_db: Arc<CollabKVDB>,
|
||||
pub container_name: Option<String>,
|
||||
pub parent_view_id: Option<String>,
|
||||
pub source: ImportedSource,
|
||||
|
@ -134,7 +134,7 @@ pub(crate) fn prepare_import(
|
|||
|
||||
Ok(ImportedFolder {
|
||||
imported_session,
|
||||
imported_collab_db: Arc::downgrade(&imported_collab_db),
|
||||
imported_collab_db,
|
||||
container_name: None,
|
||||
parent_view_id,
|
||||
source: ImportedSource::ExternalFolder,
|
||||
|
@ -174,10 +174,7 @@ pub(crate) fn generate_import_data(
|
|||
let imported_workspace_id = imported_folder.imported_session.workspace_id.clone();
|
||||
let imported_session = imported_folder.imported_session.clone();
|
||||
let imported_workspace_database_id = imported_folder.workspace_database_id.clone();
|
||||
let imported_collab_db = imported_folder
|
||||
.imported_collab_db
|
||||
.upgrade()
|
||||
.ok_or_else(|| FlowyError::internal().with_context("Failed to upgrade DB object"))?;
|
||||
let imported_collab_db = imported_folder.imported_collab_db.clone();
|
||||
let imported_container_view_name = imported_folder.container_name.clone();
|
||||
|
||||
let mut database_view_ids_by_database_id: HashMap<String, Vec<String>> = HashMap::new();
|
||||
|
|
|
@ -793,7 +793,9 @@ impl UserManager {
|
|||
let old_collab_db = self
|
||||
.authenticate_user
|
||||
.database
|
||||
.get_collab_db(old_user.session.user_id)?;
|
||||
.get_collab_db(old_user.session.user_id)?
|
||||
.upgrade()
|
||||
.ok_or_else(FlowyError::ref_drop)?;
|
||||
|
||||
if auth_type == &AuthType::AppFlowyCloud {
|
||||
self
|
||||
|
|
|
@ -3,7 +3,7 @@ use client_api::entity::billing_dto::{RecurringInterval, SubscriptionPlanDetail}
|
|||
use client_api::entity::billing_dto::{SubscriptionPlan, WorkspaceUsageAndLimit};
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::sync::{Arc, Weak};
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::entities::{
|
||||
RepeatedUserWorkspacePB, SubscribeWorkspacePB, SuccessWorkspaceSubscriptionPB,
|
||||
|
@ -141,7 +141,7 @@ impl UserManager {
|
|||
pub async fn migration_anon_user_on_appflowy_cloud_sign_up(
|
||||
&self,
|
||||
old_user: &AnonUser,
|
||||
old_collab_db: &Weak<CollabKVDB>,
|
||||
old_collab_db: &Arc<CollabKVDB>,
|
||||
) -> FlowyResult<()> {
|
||||
let import_context = ImportedFolder {
|
||||
imported_session: old_user.session.as_ref().clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue