Skip to content

Commit

Permalink
Merge pull request #330 from plank/update-rtd
Browse files Browse the repository at this point in the history
update read-the-docs config
  • Loading branch information
frasmage authored Sep 12, 2023
2 parents eea2433 + 3b970df commit 198424e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion src/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ protected function handleMediaDeletion(): void
->where('media_id', $this->getKey())
->delete();
}
// unlink associated file on delete
} elseif ($this->storage()->has($this->getDiskPath())) {
// unlink associated file on delete
$this->storage()->delete($this->getDiskPath());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mediable.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ protected function handleMediableDeletion(): void
if (config('mediable.detach_on_soft_delete')) {
$this->media()->detach();
}
// always cascade for hard deletes
} else {
// always cascade for hard deletes
$this->media()->detach();
}
}
Expand Down

0 comments on commit 198424e

Please sign in to comment.