Ronnie has proposed merging 
lp:~ronnie.vd.c/loco-directory/team-contact-lp-owner into lp:loco-directory.

Requested reviews:
  loco-directory-dev (loco-directory-dev)

For more details, see:
https://code.launchpad.net/~ronnie.vd.c/loco-directory/team-contact-lp-owner/+merge/62687

If a team has no contaxt set, put the team owner in it.
-- 
https://code.launchpad.net/~ronnie.vd.c/loco-directory/team-contact-lp-owner/+merge/62687
Your team loco-directory-dev is requested to review the proposed merge of 
lp:~ronnie.vd.c/loco-directory/team-contact-lp-owner into lp:loco-directory.
=== modified file 'loco_directory/teams/management/commands/lpupdate.py'
--- loco_directory/teams/management/commands/lpupdate.py	2011-02-19 00:55:59 +0000
+++ loco_directory/teams/management/commands/lpupdate.py	2011-05-27 14:29:23 +0000
@@ -79,8 +79,10 @@
                 team = filter(lambda a: a.lp_name == l.name, existing_locos)[0]
                 team.name = l.display_name
                 team.owner_profile = create_profile(get_team_owner(l).name)
+                if not len(team.contact_profiles.all()):
+                    team.contact_profiles.add(team.owner_profile)
             update_admins(team, l, lp)
-                
+            
             if not existing_groups or l.name not in [g.name for g in existing_groups]:
                 group = Group(name=l.name)
                 group.save()

_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to