fix bug I added when switching symlink create to init code, path_type was the id, not a string... use DB to get right val

This commit is contained in:
2021-06-22 20:54:52 +10:00
parent 5bca620006
commit 83db6d492b

View File

@@ -776,7 +776,8 @@ def JobImportDir(job):
if not os.path.exists( path ): if not os.path.exists( path ):
FinishJob( job, f"Finished Importing: {path} -- Path does not exist", "Failed" ) FinishJob( job, f"Finished Importing: {path} -- Path does not exist", "Failed" )
return return
symlink=SymlinkName(path_type.name, path, path) ptype = session.query(PathType).get(path_type)
symlink=SymlinkName(ptype.name, path, path)
# create/find the Path # create/find the Path
path_obj=AddPath( job, symlink, path_type ) path_obj=AddPath( job, symlink, path_type )