Skip to content

Commit

Permalink
Fix duplocate code
Browse files Browse the repository at this point in the history
  • Loading branch information
tibetsprague committed Jan 31, 2025
1 parent 6e65b3e commit 2e2f57e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions apps/backend/api/models/Group.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,6 @@ module.exports = bookshelf.Model.extend(merge({

// Get home tag id for the home chat
const homeTag = await Tag.where({ name: 'home' }).fetch({ transacting: trx })
// XXX: make sure there is a home tag for every group
const homeGroupTag = await GroupTag.where({ group_id: this.id, tag_id: homeTag.id }).fetch({ transacting: trx })
if (!homeGroupTag) {
await GroupTag.create({ group_id: this.id, tag_id: homeTag.id, user_id: this.get('created_by_id'), is_default: true }, { transacting: trx })
}

// XXX: make sure there is a home tag for every group
const homeGroupTag = await GroupTag.where({ group_id: this.id, tag_id: homeTag.id }).fetch({ transacting: trx })
Expand Down

0 comments on commit 2e2f57e

Please sign in to comment.