From 1f77509017fbb615af222487f3b3d4c0c5574fb7 Mon Sep 17 00:00:00 2001 From: Brian Abelson Date: Sun, 11 Aug 2013 10:40:27 -0400 Subject: [PATCH] update table.update to perform the same as upsert --- dataset/persistence/table.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dataset/persistence/table.py b/dataset/persistence/table.py index fd41918..0d13712 100644 --- a/dataset/persistence/table.py +++ b/dataset/persistence/table.py @@ -117,6 +117,10 @@ class Table(object): they will be created based on the settings of ``ensure`` and ``types``, matching the behavior of :py:meth:`insert() `. """ + # check whether keys arg is a string and format as a list + if isinstance(keys, basestring): + keys = [keys] + self._check_dropped() if not len(keys) or len(keys)==len(row): return False