Daniel Holbach has proposed merging lp:~dholbach/loco-directory/581657 into
lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
Related bugs:
#581657 Teams that were approved but no longer are, still show as approved
https://bugs.launchpad.net/bugs/581657
--
https://code.launchpad.net/~dholbach/loco-directory/581657/+merge/25420
Your team loco-directory-dev is requested to review the proposed merge of
lp:~dholbach/loco-directory/581657 into lp:loco-directory.
=== modified file 'loco_directory/teams/management/commands/lpupdate.py'
--- loco_directory/teams/management/commands/lpupdate.py 2010-03-15 17:59:31 +0000
+++ loco_directory/teams/management/commands/lpupdate.py 2010-05-17 10:39:26 +0000
@@ -39,10 +39,9 @@
group.save()
approved_entry = filter(lambda a: a.team.name == u"locoteams-approved", l.memberships_details)
if approved_entry:
- approval = approved_entry[0]
- if not team.approved:
- team.approved = True
+ team.approved = True
if team.approved:
+ approval = approved_entry[0]
if isinstance(approval.date_expires, unicode):
try:
team.expires_date = datetime.strptime(approval.date_expires[:19], "%Y-%m-%dT%H:%M:%S")
@@ -50,5 +49,8 @@
team.expires_date = datetime.strptime(approval.date_expires[:11], "%Y-%m-%d")
else:
team.expires_date = approval.date_expires
+ else:
+ team.approved = False
+ team.expires_date = None
team.mugshot_url = launchpad.get_mugshot_url(lp, l.name)
team.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