Merge lp:~daker/loco-team-portal/fix.1273491 into lp:loco-team-portal

Proposed by Adnane Belmadiaf
Status: Needs review
Proposed branch: lp:~daker/loco-team-portal/fix.1273491
Merge into: lp:loco-team-portal
Diff against target: 51 lines (+18/-1)
2 files modified
loco_directory/media/css/styles.css (+0/-1)
loco_directory/teams/utils.py (+18/-0)
To merge this branch: bzr merge lp:~daker/loco-team-portal/fix.1273491
Reviewer Review Type Date Requested Status
Lucy Llewellyn (community) Needs Fixing
Pablo Rubianes (community) Approve
ԜаӀtеr Ⅼарсһуnѕkі Pending
LoCo Team Portal Developers Pending
Review via email: mp+229522@code.launchpad.net

Commit message

Fixed merge functionnality

To post a comment you must log in.
683. By Adnane Belmadiaf

Fixed icons

684. By Adnane Belmadiaf

Fixes

Revision history for this message
Pablo Rubianes (pablorubianes-uy) wrote :

Approved in order to merge

review: Approve
Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

the change to loco_directory/media/css/styles.css appears unrelated. This should be backed-out leaving just the changes in loco_directory/teams/utils.py for this merge to proceed.

review: Needs Fixing

Unmerged revisions

684. By Adnane Belmadiaf

Fixes

683. By Adnane Belmadiaf

Fixed icons

682. By Adnane Belmadiaf

Fixed merge functionnality

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'loco_directory/media/css/styles.css'
--- loco_directory/media/css/styles.css 2013-10-30 00:31:14 +0000
+++ loco_directory/media/css/styles.css 2014-08-04 21:57:04 +0000
@@ -1603,7 +1603,6 @@
1603 width: 20px;1603 width: 20px;
1604 height: 20px;1604 height: 20px;
1605 display: inline-block;1605 display: inline-block;
1606 top: -10px;
1607}1606}
16081607
1609.pictogram-l {1608.pictogram-l {
16101609
=== modified file 'loco_directory/teams/utils.py'
--- loco_directory/teams/utils.py 2012-12-25 22:00:46 +0000
+++ loco_directory/teams/utils.py 2014-08-04 21:57:04 +0000
@@ -1,17 +1,35 @@
1from django.utils.translation import ugettext1from django.utils.translation import ugettext
22
3from events.models import TeamEvent3from events.models import TeamEvent
4from meetings.models import TeamMeeting
5from articles.models import Feed
46
57
6def merge_teams(old_team, new_team):8def merge_teams(old_team, new_team):
7 msgs = []9 msgs = []
8 related_events = TeamEvent.objects.filter(teams__id=old_team.id)10 related_events = TeamEvent.objects.filter(teams__id=old_team.id)
11
9 for event in related_events:12 for event in related_events:
10 for team in event.teams.filter(id=old_team.id):13 for team in event.teams.filter(id=old_team.id):
11 msgs += [ugettext('New owner of event "%(event)s" is team "%(team)s".' % {'event':event.name, 'team':new_team.name})]14 msgs += [ugettext('New owner of event "%(event)s" is team "%(team)s".' % {'event':event.name, 'team':new_team.name})]
12 event.teams.remove(team)15 event.teams.remove(team)
13 event.teams.add(new_team)16 event.teams.add(new_team)
14 event.save()17 event.save()
18
19 related_meetings = TeamMeeting.objects.filter(teams__id=old_team.id)
20 for meeting in related_meetings:
21 for team in meeting.teams.filter(id=old_team.id):
22 msgs += [ugettext('New owner of meeting "%(meeting)s" is team "%(team)s".' % {'meeting':meeting.name, 'team':new_team.name})]
23 meeting.teams.remove(team)
24 meeting.teams.add(new_team)
25 meeting.save()
26
27 related_feeds = Feed.objects.filter(team__id=old_team.id)
28 for feed in related_feeds:
29 msgs += [ugettext('New owner of feed "%(feed)s" is team "%(team)s".' % {'feed':feed.title, 'team':new_team.name})]
30 feed.team = new_team
31 feed.save()
32
15 if old_team.contact_profiles.count() and not new_team.contact_profiles.count():33 if old_team.contact_profiles.count() and not new_team.contact_profiles.count():
16 for contact_profile in old_team.contact_profiles.all():34 for contact_profile in old_team.contact_profiles.all():
17 new_team.contact_profiles.add(contact_profile)35 new_team.contact_profiles.add(contact_profile)

Subscribers

People subscribed via source and target branches