Delete version before symlink task
@@ -218,9 +218,10 @@ class Version(models.Model):
from readthedocs.projects import tasks
log.info('Removing files for version %s', self.slug)
broadcast(type='app', task=tasks.clear_artifacts, args=[self.get_artifact_paths()])
- broadcast(
- type='app', task=tasks.symlink_project, args=[self.project.pk])
+ project_pk = self.project.pk
super(Version, self).delete(*args, **kwargs)
+ broadcast(
+ type='app', task=tasks.symlink_project, args=[project_pk])
@property
def identifier_friendly(self):
