Fix migration through manual testing

This commit is contained in:
AlanCoding
2020-05-14 16:05:21 -04:00
parent b6a4c34b7a
commit 3c8c1858d4
2 changed files with 13 additions and 3 deletions
+5 -1
View File
@@ -2281,7 +2281,11 @@ class RunProjectUpdate(BaseTask):
def acquire_lock(self, instance, blocking=True):
lock_path = instance.get_lock_file()
if lock_path is None:
raise RuntimeError(u'Invalid lock file path')
# If from migration or someone blanked local_path for any other reason, recoverable by save
instance.save()
lock_path = instance.get_lock_file()
if lock_path is None:
raise RuntimeError(u'Invalid lock file path')
try:
self.lock_fd = os.open(lock_path, os.O_RDWR | os.O_CREAT)