mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-25 01:34:38 +01:00
Loramanager fixes
- avoid console errors in python and JS code - suppress localhost:9000/null links
This commit is contained in:
parent
c13d1093ee
commit
6311b80474
@ -55,8 +55,13 @@ def init():
|
|||||||
return bucketfiles
|
return bucketfiles
|
||||||
|
|
||||||
else:
|
else:
|
||||||
bucket_id = crud.get_bucket_by_path(db, path).id
|
bucket = crud.get_bucket_by_path(db, path)
|
||||||
|
if bucket == None:
|
||||||
|
raise HTTPException(status_code=404, detail="Bucket not found")
|
||||||
|
bucket_id = bucket.id
|
||||||
bucketfile = db.query(models.BucketFile).filter(models.BucketFile.bucket_id == bucket_id, models.BucketFile.filename == filename).first()
|
bucketfile = db.query(models.BucketFile).filter(models.BucketFile.bucket_id == bucket_id, models.BucketFile.filename == filename).first()
|
||||||
|
if bucketfile == None:
|
||||||
|
raise HTTPException(status_code=404, detail="File not found")
|
||||||
|
|
||||||
suffix = get_suffix_from_filename(filename)
|
suffix = get_suffix_from_filename(filename)
|
||||||
|
|
||||||
|
@ -645,8 +645,10 @@
|
|||||||
} else {
|
} else {
|
||||||
LoraUI.keywordsField.value = info.keywords.join("\n")
|
LoraUI.keywordsField.value = info.keywords.join("\n")
|
||||||
LoraUI.notesField.value = info.notes
|
LoraUI.notesField.value = info.notes
|
||||||
if ("civitai" in info) {
|
if ("civitai" in info && info["civitai"] != null) {
|
||||||
LoraUI.showCivitaiLink(info.civitai)
|
LoraUI.showCivitaiLink(info.civitai)
|
||||||
|
} else {
|
||||||
|
LoraUI.hideCivitaiLink()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -657,7 +659,6 @@
|
|||||||
LoraUI.imagePlaceholder.classList.add("displayNone")
|
LoraUI.imagePlaceholder.classList.add("displayNone")
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Caught error:", error)
|
|
||||||
LoraUI.image.classList.add("displayNone")
|
LoraUI.image.classList.add("displayNone")
|
||||||
LoraUI.imagePlaceholder.classList.remove("displayNone")
|
LoraUI.imagePlaceholder.classList.remove("displayNone")
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user