This commit is contained in:
Matthew Mckenzie 2025-07-18 13:19:48 +10:00 committed by GitHub
commit a9b5b3ec28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -1128,9 +1128,8 @@ class FreeNASApiDriver extends CsiBaseDriver {
target = null;
if (
response.statusCode == 422 &&
JSON.stringify(response.body).includes(
"Target name already exists"
)
JSON.stringify(response.body)
.match(/Target(.*)name already exists/g)?.length > 0
) {
target = await httpApiClient.findResourceByProperties(
"/iscsi/target",

View File

@ -1217,9 +1217,8 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
target = null;
if (
response.statusCode == 422 &&
JSON.stringify(response.body).includes(
"Target name already exists"
)
JSON.stringify(response.body)
.match(/Target(.*)name already exists/g)?.length > 0
) {
target = await this.findResourceByProperties(
"/iscsi/target",