fix a compiler smart cast complain

This commit is contained in:
Gauthier Roebroeck 2026-04-23 11:37:28 +08:00
parent 36b773ae43
commit 2762352dfe

View file

@ -112,10 +112,12 @@ class UserController(
restrictions =
ContentRestrictions(
ageRestriction =
if (ageRestriction == null || ageRestriction.restriction == AllowExcludeDto.NONE)
null
else
AgeRestriction(ageRestriction.age, ageRestriction.restriction.toDomain()),
ageRestriction.let {
if (it == null || it.restriction == AllowExcludeDto.NONE)
null
else
AgeRestriction(it.age, it.restriction.toDomain())
},
labelsAllow = labelsAllow ?: emptySet(),
labelsExclude = labelsExclude ?: emptySet(),
),