Skip to content

Commit

Permalink
Update players.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnless committed Jan 1, 2024
1 parent dec3113 commit 3612309
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion enkapy/model/players.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@


class ProfilePicture(BaseModel):
id: Optional[int]
avatarId1: Optional[int] = Field(0, alias='id')
avatarId2: Optional[int] = Field(0, alias='avatarId')

@property
def avatarId(self):
if self.avatarId1:
return self.avatarId1
elif self.avatarId2:
return self.avatarId2
else:
return 0



class ShowAvatar(BaseModel):
Expand Down

0 comments on commit 3612309

Please sign in to comment.