Compare commits

...

2 Commits

Author SHA1 Message Date
Ching
e7a579e168 fix(recipe models): 修复通过嘟嘟创建菜谱时没有设置 status 导致创建失败的问题
修复通过嘟嘟创建菜谱时没有设置 status 导致创建失败的问题

Signed-off-by: Ching <loooching@gmail.com>
2022-02-10 22:38:12 +08:00
Ching
b26000205b fix(scripts): 修复 bitwarden 备份数据路径有误的问题
修复 bitwarden 备份数据路径有误的问题

Signed-off-by: Ching <loooching@gmail.com>
2022-02-10 22:35:57 +08:00
2 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,9 @@ class Recipe(models.Model):
difficulty = 0
else:
difficulty = 0
recipe = cls.objects.create(name=name, recipe_type=recipe_type, rate=rate, difficulty=difficulty)
recipe = cls.objects.create(
name=name, recipe_type=recipe_type, rate=rate, difficulty=difficulty, status=const.RECIPE_STATUS_ACTIVE
)
return recipe
@property

View File

@ -78,6 +78,6 @@ def send_email(file_name):
if __name__ == '__main__':
file_name = './backup/bitwarden-%s.tar.gz' % localtime.strftime('%Y-%m-%d')
file_name = '/root/develop/vaultwarden/backup/bitwarden-%s.tar.gz' % localtime.strftime('%Y-%m-%d')
if make_targz(file_name, '/root/develop/vaultwarden/vw-data'):
send_email(file_name)