aamalig / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Include *args and **kwargs when overriding Avatar.save() #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Allows, for example, get_object_or_create() to pass force_insert=True.

Index: models.py
===================================================================
--- models.py   (revision 434)
+++ models.py   (working copy)
@@ -86,7 +86,7 @@

         super(Avatar, self).delete()

-    def save(self):
+    def save(self, *args, **kwargs):
         for avatar in Avatar.objects.filter(user=self.user, valid=self.valid).exclude(id=self.id):
             if hasattr(settings, "AWS_SECRET_ACCESS_KEY"):
                 path = urllib.unquote(self.image.name)

Original issue reported on code.google.com by daemianmack@gmail.com on 30 Mar 2010 at 12:21

GoogleCodeExporter commented 8 years ago
thanks, resolved in [442]

Original comment by stephane.angel on 26 Apr 2010 at 3:55

GoogleCodeExporter commented 8 years ago
i wanted to say in r442

Original comment by stephane.angel on 26 Apr 2010 at 4:27