Correct robot task arg order.
@@ -142,7 +142,7 @@ class RobotScheduleMigration(AbstractRobotMigration):
name=self.config.task_name,
task=self.config.task,
description=self.config.description,
- args=json.dumps([self.config.label, 1]), # Note 1 should always be the system user
+ args=json.dumps([1, self.config.label]), # Note 1 should always be the system user
crontab=tab,
).save()
@@ -151,7 +151,7 @@ class RobotScheduleMigration(AbstractRobotMigration):
try:
PeriodicTask.get(
task=self.config.task,
- args=json.dumps([self.config.label, 1]), # Note 1 should always be the system user
+ args=json.dumps([1, self.config.label]), # Note 1 should always be the system user
).delete()
except PeriodicTask.DoesNotExist:
pass
@@ -164,5 +164,5 @@ class DisableRobotScheduleMigration(AbstractRobotMigration):
PeriodicTask.objects.filter(
task=self.config.task,
- args=json.dumps([self.config.label, 1]), # Note 1 should always be the system user
+ args=json.dumps([1, self.config.label]), # Note 1 should always be the system user
).update(enabled=False)
