Bug fixes/v0.5.1 (#545)

* dump deps

* add job for new groups on interval

* change sort icon

* fix cart icon

* bump version

* changelog

* early return if no comments

* remove comment

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-06-17 08:57:28 -08:00 committed by GitHub
parent 1d7c06352c
commit b545e75f09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 123 additions and 71 deletions

View file

@ -0,0 +1,11 @@
# vx.x.x COOL TITLE GOES HERE
**App Version: v0.5.1**
**Database Version: v0.5.0**
## Bug Fixes
- Fixed #538 - Missing Ingredients on Editor
- Fixed error on webhooks for new groups
- Fixed various icons references

View file

@ -92,6 +92,7 @@ nav:
- Style Guide: "contributors/developers-guide/style-guide.md"
- Development Road Map: "roadmap.md"
- Change Log:
- v0.5.1 Bug Fixes: "changelog/v0.5.1.md"
- v0.5.0 General Upgrades: "changelog/v0.5.0.md"
- v0.4.3 Hot Fix: "changelog/v0.4.3.md"
- v0.4.2 Backend/Migrations: "changelog/v0.4.2.md"

View file

@ -2785,17 +2785,6 @@
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@ -2822,31 +2811,12 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
@ -2867,28 +2837,6 @@
"ansi-regex": "^5.0.0"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.2.0",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
"integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
},
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
@ -13037,6 +12985,87 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.2.0",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
"integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz",

View file

@ -16,7 +16,7 @@
<template v-slot:activator="{ on, attrs }">
<v-btn text :icon="$vuetify.breakpoint.xsOnly" v-bind="attrs" v-on="on" :loading="sortLoading">
<v-icon :left="!$vuetify.breakpoint.xsOnly">
{{ $globals.icons.sort }}
{{ $globals.icons.diceMultiple }}
</v-icon>
{{ $vuetify.breakpoint.xsOnly ? null : $t("general.sort") }}
</v-btn>

View file

@ -20,7 +20,7 @@
<v-card-actions class="mb-0 px-2 py-0">
<v-btn text small v-if="!mealplan.shoppingList" color="info" @click="createShoppingList(mealplan.uid)">
<v-icon left small>
{{ $globals.icons.mdiCartCheck }}
{{ $globals.icons.cartCheck }}
</v-icon>
{{ $t("shopping-list.create-shopping-list") }}
</v-btn>

View file

@ -6,7 +6,7 @@ from typing import Any, Optional, Union
import dotenv
from pydantic import BaseSettings, Field, PostgresDsn, validator
APP_VERSION = "v0.5.0"
APP_VERSION = "v0.5.1"
DB_VERSION = "v0.5.0"
CWD = Path(__file__).parent

View file

@ -89,6 +89,9 @@ class ImportDatabase:
def import_comments(self):
comment_dir: Path = self.import_dir.joinpath("comments", "comments.json")
if not comment_dir.exists():
return
comments = ImportDatabase.read_models_file(file_path=comment_dir, model=CommentOut)
for comment in comments:
@ -192,7 +195,7 @@ class ImportDatabase:
return import_notifications
def import_settings(self): # ! Broken
def import_settings(self):
settings_file = self.import_dir.joinpath("settings", "settings.json")
settings = ImportDatabase.read_models_file(settings_file, SiteSettings)
settings = settings[0]
@ -367,7 +370,6 @@ def import_database(
theme_report = import_session.import_themes()
if import_pages:
print("IMport Pages")
page_report = import_session.import_pages()
group_report = []
@ -378,6 +380,7 @@ def import_database(
if import_users:
user_report = import_session.import_users()
notification_report = []
if import_notifications:
notification_report = import_session.import_notifications()

View file

@ -45,6 +45,12 @@ def update_webhook_schedule():
time = cron_parser(group.webhook_time)
job = JOB_STORE.get(group.name)
if not job:
logger.error(f"No job found for group: {group.name}")
logger.info(f"Creating scheduled task for {group.name}")
JOB_STORE.update(add_group_to_schedule(scheduler, group))
continue
scheduler.reschedule_job(
job.scheduled_task.id,
trigger="cron",
@ -77,15 +83,10 @@ class ScheduledFunction:
)
def init_webhook_schedule(scheduler, job_store: dict):
session = create_session()
all_groups: list[GroupInDB] = db.groups.get_all(session)
for group in all_groups:
def add_group_to_schedule(scheduler, group: GroupInDB):
cron = cron_parser(group.webhook_time)
job_store.update(
{
return {
group.name: ScheduledFunction(
scheduler,
post_webhooks,
@ -94,7 +95,14 @@ def init_webhook_schedule(scheduler, job_store: dict):
args=[group.id],
)
}
)
def init_webhook_schedule(scheduler, job_store: dict):
session = create_session()
all_groups: list[GroupInDB] = db.groups.get_all(session)
for group in all_groups:
job_store.update(add_group_to_schedule(scheduler, group))
session.close()

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "mealie"
version = "0.5.0"
version = "0.5.1"
description = "A Recipe Manager"
authors = ["Hayden <hay-kot@pm.me>"]
license = "MIT"