We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9cf79a commit c70ef23Copy full SHA for c70ef23
finder/models/folder.py
@@ -204,7 +204,7 @@ def validate_constraints(self):
204
msg = gettext("A parent folder can not become the descendant of a destination folder.")
205
raise ValidationError(msg)
206
parent = parent.parent
207
- if next(self.parent.listdir(name=self.name), None):
+ if self.parent.listdir(name=self.name).exists():
208
msg = gettext("Folder named “{name}” already exists in destination folder.")
209
raise ValidationError(msg.format(name=self.name))
210
if self.name in ['__root__', '__trash__']:
0 commit comments