diff --git a/app/Transformers/UserCompactTransformer.php b/app/Transformers/UserCompactTransformer.php index 15e71dea888..7c83a1f3d83 100644 --- a/app/Transformers/UserCompactTransformer.php +++ b/app/Transformers/UserCompactTransformer.php @@ -22,7 +22,6 @@ class UserCompactTransformer extends TransformerAbstract ]; const CARD_INCLUDES_PRELOAD = [ - 'country', 'userGroups', ]; @@ -193,9 +192,7 @@ public function includeCommentsCount(User $user) public function includeCountry(User $user) { - return $user->country === null - ? $this->primitive(null) - : $this->item($user->country, new CountryTransformer()); + return $this->item(app('countries')->byCode($user->country_acronym), new CountryTransformer()); } public function includeCover(User $user)