Revert "v0.2.1 (#157)" (#158)

This reverts commit a899f46464.
This commit is contained in:
Hayden
2021-02-10 19:39:46 -09:00
committed by GitHub
parent a899f46464
commit 8221c36a89
82 changed files with 895 additions and 937 deletions

View File

@@ -8,6 +8,19 @@ from sqlalchemy.orm.session import Session
from services.recipe_services import Recipe
CWD = Path(__file__).parent
THIS_WEEK = CWD.parent.joinpath("data", "meal_plan", "this_week.json")
NEXT_WEEK = CWD.parent.joinpath("data", "meal_plan", "next_week.json")
WEEKDAYS = [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
]
class Meal(BaseModel):
slug: Optional[str]
@@ -68,7 +81,7 @@ class MealPlan(BaseModel):
self.meals = meals
def save_to_db(self, session: Session):
db.meals.create(session, self.dict())
db.meals.save_new(session, self.dict())
@staticmethod
def get_all(session: Session) -> List: