From 1fe1c8d5a8d3f7873d7d69d4e8e47fd721d2e773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Koral?= <45078678+oguzhankoral@users.noreply.github.com> Date: Fri, 28 Mar 2025 16:47:56 +0300 Subject: [PATCH] Fix the source of the issue (#423) --- speckle_connector_3/src/accounts/accounts.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/speckle_connector_3/src/accounts/accounts.rb b/speckle_connector_3/src/accounts/accounts.rb index 26110ef..fd8da09 100644 --- a/speckle_connector_3/src/accounts/accounts.rb +++ b/speckle_connector_3/src/accounts/accounts.rb @@ -3,6 +3,7 @@ require 'JSON' require_relative '../ext/sqlite3' require_relative '../constants/path_constants' +require_relative '../preferences/preferences' module SpeckleConnector3 # Accounts to communicate with models on user's account. @@ -11,11 +12,11 @@ module SpeckleConnector3 def self.load_accounts db_path = SPECKLE_ACCOUNTS_DB_PATH unless File.exist?(db_path) - raise( - IOError, - "No Accounts db found. Please read the guide for different options for adding your account:\n - https://speckle.guide/user/manager.html#adding-accounts" - ) + File.new(SPECKLE_ACCOUNTS_DB_PATH, "w") + db = Sqlite3::Database.new(SPECKLE_ACCOUNTS_DB_PATH) + Preferences.create_objects_table(db) + db.close + return [] end db = Sqlite3::Database.new(db_path)