# グループアバターのフレアが既存メンバーに適用されない

**URL:** https://meta.discourse.org/t/group-avatar-flair-doesnt-apply-to-existing-members/206210
**Category:** Bug
**Created:** [2021 年 10 月 16 日午前 7:59 UTC](https://meta.discourse.org/t/group-avatar-flair-doesnt-apply-to-existing-members/206210 "2021-10-16T07:59:21Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2021 年 10 月 28 日午前 7:33 UTC](https://meta.discourse.org/t/group-avatar-flair-doesnt-apply-to-existing-members/206210/8 "2021-10-28T07:33:18Z")

</div>

プライマリグループとアバターが分離されたため、グループメンバーにグループアバターを強制的に使用させる方法を投稿しました：

> [@Can no longer assign avatar flair by setting primary group](https://meta.discourse.org/t/can-no-longer-assign-avatar-flair-by-setting-primary-group/206185/2):
>
> This forces group members to have the group avatar: rails c target\_group = Group.find\_by\_name("=GroupSlug=") users = User.joins(:group\_users).where(group\_users:{group\_id: target\_group.id}) users.each do |u| u.flair\_group\_id = target\_group.id u.save end Exit

---

_[View the full topic](https://meta.discourse.org/t/group-avatar-flair-doesnt-apply-to-existing-members/206210)._
