Author: gregoryjnewman
Date: Thu Sep 11 14:39:41 2008
New Revision: 870

Modified:
    trunk/pinax/local_apps/photos/views.py

Log:
moving list 't' out of if statement, fixing ticket #131

Modified: trunk/pinax/local_apps/photos/views.py
==============================================================================
--- trunk/pinax/local_apps/photos/views.py      (original)
+++ trunk/pinax/local_apps/photos/views.py      Thu Sep 11 14:39:41 2008
@@ -52,10 +52,9 @@
      tribes = Tribe.objects.filter(members=request.user)
      projects = Project.objects.filter(members=request.user)
      photo = get_object_or_404(Photos, id=id)
-
+    t = []

      if tribes:
-        t = []
          for tribe in tribes:
              phototribe = Tribe.objects.get(pk=tribe.id)
              if phototribe.photos.filter(photo=photo).count():
@@ -105,7 +104,7 @@
                  tribeid = request.POST["tribe"]
                  mytribe = Tribe.objects.get(pk=tribeid)
                  if mytribe.photos.filter(photo=photo).count():
-                    mytribe.photos.destroy(photo=photo)
+                    # mytribe.photos(photo=photo)
                       
request.user.message_set.create(message=_("Successfully add photo '%s' to  
tribe") % title)
                  else:
                      # TODO: this applies to pinax in general. dont use  
ugettext_lazy here. its usage is fragile.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to