feat(backend): Minor linting, bulk URL import, and improve BG tasks (#760)

* Fixes #751

* Fixes not showing original URL

* start slice at 0 instead of 1

* remove print statements

* add linter for print statements and remove print

* hide all buttons when edit disabled

* add bulk import API

* update attribute bindings

* unify button styles

* bulk add recipe feature

* thanks linter!

* uncomment code

Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-10-28 19:28:33 -08:00
committed by GitHub
parent 1e5ef28f91
commit 2afaf70a03
24 changed files with 295 additions and 65 deletions

View File

@@ -1,9 +1,11 @@
import json
from pathlib import Path
from mealie.core.root_logger import get_logger
from mealie.db.data_access_layer.access_model_factory import Database
CWD = Path(__file__).parent
logger = get_logger(__name__)
def get_default_foods():
@@ -23,10 +25,10 @@ def default_recipe_unit_init(db: Database) -> None:
try:
db.ingredient_units.create(unit)
except Exception as e:
print(e)
logger.error(e)
for food in get_default_foods():
try:
db.ingredient_foods.create(food)
except Exception as e:
print(e)
logger.error(e)