python-artifactory icon indicating copy to clipboard operation
python-artifactory copied to clipboard

In class UserResponse email field is mandatory, but it can be empty which leads to model validation failure

Open sergey-ganchuk opened this issue 1 year ago • 0 comments

Describe the bug There are some users that having empty email field When trying to get those users UserResponse object fails to validate because email is mandatory

To Reproduce Find user with no email set try to get it:

artifactory.users.get(user.name)

Expected behavior it shouldn't fail model validation

python -c "import pyartifactory; print(pyartifactory.version)" 2.7.1

 - Python version, get it with:

python --version

Python 3.8.10

**Additional context**
class UserResponse(BaseUserModel):
    """Models a user response."""

    email: **Optional[EmailStr]** EmailStr
    lastLoggedIn: Optional[datetime] = None
    realm: Optional[str] = None
    offlineMode: bool = False

sergey-ganchuk avatar Dec 09 '24 08:12 sergey-ganchuk