mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Allowing deletion of FileGroup when its files are missing.
This commit is contained in:
parent
8d0f30566f
commit
7c5fd7e462
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ class FileGroup(ModelHelper, Base):
|
|||
raise FileGroupIsTagged(f'Cannot delete {self} because it has tags')
|
||||
|
||||
for path in self.my_paths():
|
||||
path.unlink()
|
||||
path.unlink(missing_ok=True)
|
||||
|
||||
if session := Session.object_session(self):
|
||||
session.delete(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue