-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: optionally join the [email protected] team
- Loading branch information
Showing
5 changed files
with
59 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
from ..models.user_team_topic import UserTeamTopic | ||
from .base import DatabaseAbstractRepository | ||
from .team_topic import TeamTopicRepo | ||
from .user_team import UserTeamRepo | ||
|
||
|
||
class UserTeamTopicRepo(DatabaseAbstractRepository): | ||
ORM_Model = UserTeamTopic | ||
|
||
def create_from_kwargs(self, **kwargs): | ||
user_team_topic = super().create_from_kwargs(**kwargs) | ||
|
||
team_topic_repo = TeamTopicRepo(self._db) | ||
team_topic = team_topic_repo.get_by_id(user_team_topic.team_topic_id) | ||
|
||
# Let's make sure we are subscribed to the team when we subscribe to a | ||
# topic! | ||
user_team_repo = UserTeamRepo(self._db) | ||
user_team_repo.ensure_member( | ||
user_id=user_team_topic.user_id, team_id=team_topic.team_id | ||
) | ||
|
||
return user_team_topic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,13 @@ | |
.control.has-icons-left.block | ||
input#accept_newsletter.switch.is-medium.is-rounded.is-success(type="checkbox" name="accept_newsletter") | ||
label(for='accept_newsletter') | ||
.field | ||
label.label Join | ||
tt [email protected] | ||
div.is-size-6.has-text-weight-normal We would like to join the news topic of relay.md? | ||
.control.has-icons-left.block | ||
input#join_news_team.switch.is-medium.is-rounded.is-success(type="checkbox" name="join_news_team" checked="checked") | ||
label(for='join_news_team') | ||
.field | ||
sup.is-size-7.has-text-danger * | ||
span.is-size-6.has-text-weight-normal Required | ||
|