Skip to content

Commit 53ba22b

Browse files
committed
Mypy
1 parent a41d476 commit 53ba22b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/utils/auth/providers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,12 @@ def get_userinfo(self, user: models_users.CoreUser) -> dict[str, Any]:
174174
# For Piwigo, providing the username is sufficient. The name of the claim (here `"name"`) needs to be set in Piwigo oidc plugin configuration page.
175175
# A modified Piwigo oidc plugin allows managing groups from the oidc provider
176176
promo = user.promo
177-
if promo is not None:
178-
promo = str(promo) if promo >= 2014 else None
179177
return {
180178
"sub": user.id,
181179
"name": user.full_name,
182180
"groups": [group.name for group in user.groups]
183181
+ [user.account_type.value]
184-
+ [promo],
182+
+ [str(promo) if promo is not None and promo >= 2014 else None],
185183
"email": user.email,
186184
}
187185

0 commit comments

Comments
 (0)