fix(file-storage): double save on compose volumes

This commit is contained in:
Andras Bacsai committed 2025-03-28 22:10:33 +01:00
1 parent 0bb47dfa56
commit c2941abe57
2 files changed
+49 -39

No files matched your search

+15
View File
@@ -176,4 +176,19 @@ class LocalFileVolume extends BaseModel
return instant_remote_process($commands, $server);
}
// Accessor for convenient access
protected function plainMountPath(): Attribute
{
return Attribute::make(
get: fn () => $this->mount_path,
set: fn ($value) => $this->mount_path = $value
);
}
// Scope for searching
public function scopeWherePlainMountPath($query, $path)
{
return $query->get()->where('plain_mount_path', $path);
}
}