title: Django: Combine multiple saves into one database action
body: <p>I have a function like this– is there a way to wrap this function so that both saves are combined into one?</p>
  <pre><code>    def foobar(self, created_at=None):
          changed = False
          if created_at:
              changed = True
              self. created_at = created_at
              self.save()
          if self.active:
              changed = True
              self.active = False
              self.save()
          return self
  </code></pre>
  <p>The reason I don't unindent <code>self.save()</code> is to avoid updating the <code>updated_at</code> field on my object if no change occurred.</p>