fixup: use the class instead of an instance

This commit is contained in:
tcely authored and GitHub committed 2025-03-26 02:12:47 -04:00
1 parent 5e82dd212a
commit 51adb65751
1 file changed
+1 -1
+1 -1
View File
@@ -216,7 +216,7 @@ class Task(models.Model):
""" """
Check if the locked_by process is still running. Check if the locked_by process is still running.
""" """
if self in self.objects.locked(timezone.now()) and self.locked_by: if self in Task.objects.locked(timezone.now()) and self.locked_by:
pid, nodename = self.locked_by.split('/', 1) pid, nodename = self.locked_by.split('/', 1)
# locked by a process on this node? # locked by a process on this node?
if nodename != self.nodename: if nodename != self.nodename: