mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
fix webhook bug
This commit is contained in:
parent
47e25ab705
commit
54b93bf1dd
2 changed files with 16 additions and 13 deletions
|
@ -63,7 +63,6 @@ def get_todays_meal(session: Session, group: Union[int, GroupInDB]) -> Recipe:
|
|||
if isinstance(group, int):
|
||||
group: GroupInDB = db.groups.get(session, group)
|
||||
|
||||
if group.webhook_enable:
|
||||
today_slug = None
|
||||
|
||||
for mealplan in group.mealplans:
|
||||
|
|
|
@ -9,6 +9,10 @@ from sqlalchemy.orm.session import Session
|
|||
def post_webhooks(group: int, session: Session = None):
|
||||
session = session if session else create_session()
|
||||
group_settings: GroupInDB = db.groups.get(session, group)
|
||||
|
||||
if not group_settings.webhook_enable:
|
||||
return
|
||||
|
||||
todays_recipe = get_todays_meal(session, group)
|
||||
|
||||
if not todays_recipe:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue