Skip to content

Commit

Permalink
fix: initialize DBRecipeLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
rugeli committed Feb 29, 2024
1 parent 329f9f5 commit e95eb52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cellpack/autopack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ def load_file(filename, destination="", cache="geometries", force=None):
# command example: `pack -r firebase:recipes/[FIREBASE-RECIPE-ID] -c [CONFIG-FILE-PATH]`
if database_name == "firebase":
db = DATABASE_IDS.handlers().get(database_name)
db_handler = DBRecipeLoader(db)
initialize_db = db()
db_handler = DBRecipeLoader(initialize_db)
recipe_id = file_path.split("/")[-1]
db_doc, _ = db_handler.collect_docs_by_id(
collection="recipes", id=recipe_id
Expand Down
2 changes: 1 addition & 1 deletion cellpack/autopack/interface_objects/database_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create_aws_handler(bucket_name, sub_folder_name, region_name):
region_name=region_name,
)

def create_firebase_handler(default_db):
def create_firebase_handler(default_db=None):
return FirebaseHandler(default_db=default_db)

handlers_dict = {
Expand Down

0 comments on commit e95eb52

Please sign in to comment.