﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33880	Ambigous error message in FilePathFields.	Willem Van Onsem	nobody	"Django's FilePathField (https://docs.djangoproject.com/en/dev/ref/models/fields/#filepathfield) specifies for the allow_files and allow_folders:

> Optional. Either `True` or `False`. Default is `True`. Specifies whether files in the specified location should be included. Either this or `allow_folders` must be `True`.

(analogue for allow_folders)

This seems to hint that one should set `allow_files` to True or `allow_folders` to `True`; but not both at the same time.

In the corresponding code, it seems to say:


{{{
    def _check_allowing_files_or_folders(self, **kwargs):
        if not self.allow_files and not self.allow_folders:
            return [
                checks.Error(
                    ""FilePathFields must have either 'allow_files' or 'allow_folders' ""
                    ""set to True."",
                    obj=self,
                    id=""fields.E140"",
                )
            ]
        return []
}}}

The code block thus checks that both parameters are not false (at the same time).

It might be better to say ""`allow_files` or `allow_folders` should be set to True"", since the either might hint that this is an exclusive or (based on this post https://english.stackexchange.com/questions/13889/does-either-a-or-b-preclude-both-a-and-b ).

This should then be both updated for the documentation, and for the error codes I think."	Cleanup/optimization	closed	Database layer (models, ORM)	4.0	Normal	invalid		Carlton Gibson	Unreviewed	0	0	0	0	1	0
