Commits

Kenneth Love committed ed7ebe0

sets can be saved

  • Participants
  • Parent commits 1ef5d3f

Comments (0)

Files changed (1)

         for k, v in values:
             r.hset(key, k.strip("' "), v.strip("' "))
 
+    if rtype == 'set':
+        r.delete(key)
+
+        value = request.form['value'].strip("set([])")
+        values = [k.split(':', 1) for k in value.split(',')]
+        for k, v in values:
+            r.sadd(key, '%s:%s' % (k, v))
+
     elif rtype == 'string':
         r.set(key, value)