Skip to content
Snippets Groups Projects
Commit aab99cb0 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[experiments] Minor fixes to model functionality

parent 3495b7f4
No related branches found
No related tags found
1 merge request!194Scheduler
...@@ -966,7 +966,7 @@ class Block(models.Model): ...@@ -966,7 +966,7 @@ class Block(models.Model):
# search for other jobs with similar outputs and has no children yet # search for other jobs with similar outputs and has no children yet
similar = Job.objects.select_for_update().filter(\ similar = Job.objects.select_for_update().filter(\
block__outputs__in=self.outputs, child=None).first() block__outputs__in=self.outputs.all(), child=None).first()
Job(block=self, parent=similar).save() Job(block=self, parent=similar).save()
...@@ -1147,7 +1147,7 @@ class CachedFile(models.Model): ...@@ -1147,7 +1147,7 @@ class CachedFile(models.Model):
def absolute_path(self): def absolute_path(self):
'''Returns the full path prefix to the cached file on disk''' '''Returns the full path prefix to the cached file on disk'''
return os.path.join(settings.CACHE_ROOT, self.relative_path()) return os.path.join(settings.CACHE_ROOT, self.path())
def files(self): def files(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment