Skip to content

Commit b140725

Browse files
committed
Allow saving Version objects with update_fields set
1 parent 8fcd1e1 commit b140725

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pgweb/core/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def treestring(self):
7474
else:
7575
return "%s %s" % (self.numtree, TESTING_SHORTSTRING[self.testing])
7676

77-
def save(self):
77+
def save(self, update_fields=None):
7878
# Make sure only one version at a time can be the current one.
7979
# (there may be some small race conditions here, but the likelyhood
8080
# that two admins are editing the version list at the same time...)
@@ -87,7 +87,7 @@ def save(self):
8787

8888
# Now that we've made any previously current ones non-current, we are
8989
# free to save this one.
90-
super(Version, self).save()
90+
super(Version, self).save(update_fields=update_fields)
9191

9292
class Meta:
9393
ordering = ('-tree', )

0 commit comments

Comments
 (0)