1. Daniel Greenfeld
  2. transifex

Commits

Dimitris Glezos  committed 98147a1

trivial: Let's return objects, it may only do good.

  • Participants
  • Parent commits f35776f
  • Branches default

Comments (0)

Files changed (1)

File projects/models.py

View file
                                         web_frontend=web_frontend)
                 u.save()
                 self.unit = u
-            except IntegrityError:
+            except self.IntegrityError:
                 logger.error("Yow! Unit exists but is not associated with %s! "
                           % self.full_name)
                 # TODO: Here we should probably send an e-mail to the 
                 # admin, because something very strange would be happening
                 pass
+        return self.unit
 
     def get_files(self):
         """Return a list of filtered files for the component."""