Compare commits

..

3 Commits

Author SHA1 Message Date
wh1te909
455bf53ba6 Release 0.11.2 2022-01-13 02:48:32 +00:00
wh1te909
454aa6ccda bump version 2022-01-13 02:48:22 +00:00
wh1te909
85ffebb3fa fix post update tasks for policy tasks 2022-01-13 02:47:34 +00:00
2 changed files with 27 additions and 24 deletions

View File

@@ -39,29 +39,32 @@ class Command(BaseCommand):
# convert autotask to the new format # convert autotask to the new format
for task in AutomatedTask.objects.all(): for task in AutomatedTask.objects.all():
edited = False try:
edited = False
# convert scheduled task_type # convert scheduled task_type
if task.task_type == "scheduled": if task.task_type == "scheduled":
task.task_type = "daily" task.task_type = "daily"
task.run_time_date = make_aware( task.run_time_date = make_aware(
dt.datetime.strptime(task.run_time_minute, "%H:%M") dt.datetime.strptime(task.run_time_minute, "%H:%M")
) )
task.daily_interval = 1 task.daily_interval = 1
edited = True edited = True
# convert actions # convert actions
if not task.actions: if not task.actions:
task.actions = [ task.actions = [
{ {
"type": "script", "type": "script",
"script": task.script.pk, "script": task.script.pk,
"script_args": task.script_args, "script_args": task.script_args,
"timeout": task.timeout, "timeout": task.timeout,
"name": task.script.name, "name": task.script.name,
} }
] ]
edited = True edited = True
if edited: if edited:
task.save() task.save()
except:
continue

View File

@@ -15,7 +15,7 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe")
AUTH_USER_MODEL = "accounts.User" AUTH_USER_MODEL = "accounts.User"
# latest release # latest release
TRMM_VERSION = "0.11.1" TRMM_VERSION = "0.11.2"
# bump this version everytime vue code is changed # bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser # to alert user they need to manually refresh their browser